Hello! When I try to compile very simple example from gettext's tutorial - I get compilation errors using gcc or g++.
Here is the source code: ----------------------------- main.c or main.cc #include <libintl.h> #include <locale.h> #include <stdio.h> #include <stdlib.h> #define _(aString) gettext(aString) int main(void) { setlocale(LC_ALL, ""); bindtextdomain("gt", "/usr/share/locale"); textdomain("gt"); printf(_("Hello, world!\n")); exit(0); } ---------------------------------- 1) I CAN NOT build the test program with MinGW (-mno-cygwin): $ gcc -o gt -mno-cygwin -g main.c main.c:3:21: libintl.h: No such file or directory In file included from /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-min gw32/include/stdio.h:26, from main.c:5: /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h:213: error: syntax error befo re "typedef" main.c: In function `main': main.c:13: error: `LC_ALL' undeclared (first use in this function) main.c:13: error: (Each undeclared identifier is reported only once main.c:13: error: for each function it appears in.) 2) I CAN NOT build the test program as C-program (with gcc): $ gcc -o gt -g main.c In file included from /usr/include/libintl.h:22, from main.c:3: /usr/include/locale.h:26: error: syntax error before "struct" I think it's because GCC doesn't understand _BEGIN_STD_C, _END_STD_C macros used inside "locale.h" 3) I CAN NOT build the test program as C++-program (with g++): g++ -o gt -g main.cc In file included from /usr/include/sys/config.h:167, from /usr/include/_ansi.h:16, from /usr/include/locale.h:10, from /usr/include/libintl.h:22, from main.cc:3: /usr/include/cygwin/config.h:18: error: expected constructor, destructor, or typ e conversion before "extern" /usr/include/cygwin/config.h:18: error: expected `,' or `;' before "extern" What is wrong? What is the workaround? --- Thank you. Alexey Lyubimov ____________________________________________________________________________________ Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center. http://autos.yahoo.com/green_center/
cygcheck.out
Description: 3924260979-cygcheck.out
-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/