Mail Archives: cygwin/2002/10/14/05:06:57
Hello,
I'm trying to understand why the following code doesn't do what I expect
it to:
#include <stdio.h>
#include <windows.h>
int main(void)
{
SetConsoleOutputCP(857);
printf("\x87\x94\x8d\x9f\x81\xa7\n");
}
(BTW, does anyone know why gcc issues a warning if main has return type
void? Is this required by any standard I haven't heard of?)
I expect the code above to print six characters from the code page 857
(the default is 866), namely: ccedilla, odiaeresis, dotlessi, scedilla,
udiaeresis, gbreve. However, it prints characters from the default code
page (that is, pseudographics, quote, '?', '?', '?', paragraph). It
prints what I expect only if compiled with -mno-cygwin, which is not
what I want (the ultimate goal is to have mutt switch code pages in one
session, without leaving mutt or bash; it works under Linux).
To understand that, I want to rebuild cygwin1.dll with debugging
information. Due to awful build performance under Windows 2000, I use
cross-compiler under Linux. I did the following:
* copied some includes and libs from an installed cygwin to
/opt/cygwin/i686-pc-cygwin/{include,lib}.
* release/binutils/binutils-20020706-2-src.tar.bz2
./configure --prefix=/opt/cygwin --target=i686-pc-cygwin
make
make install
* release/gcc2/gcc2-2.95.3-10-src.tar.bz2 with minor -lintl fixes
./configure --prefix=/opt/cygwin --target=i686-pc-cygwin
PATH=/opt/cygwin/bin:$PATH make LANGUAGES="c c++"
PATH=/opt/cygwin/bin:$PATH make LANGUAGES="c c++" install
* release/cygwin/cygwin-1.3.12-4-src.tar.bz2 with minor -I. order fixes
untbz2 release/w32api/w32api-2.0-1-src.tar.bz2 into winsup
ln -s w32api-2.0-1 winsup/w32api
./configure --prefix=/opt/cygwin --host=i686-pc-cygwin --build=i686-pc-linux-gnu.
PATH=/opt/cygwin/bin:$PATH make
The last command fails while linking new-cygwin1.dll with many errors
saying that __builtin_new, __builtin_delete, __builtin_vec_new and
__builtin_vec_delete not found. Should I use a different compiler, or
some separate C++ library?
Any ideas would be greatly appreciated.
Thanks in advance,
Baurjan.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -