From: Markus G. <ma...@ge...> - 2003-06-11 11:18:46
|
Hello, when trying to build a gettext-using application on MinGW, I always get undefined references to `libintl_gettext', `libintl_bindtextdomain', and `libintl_textdomain'. I already went away from my autoconf'ed and automade packages in order to get manual control about what happens when building the project. My manually-made build command line reads: g++ \ -I. -IC:/msys/1.0/target/include/gtkmm-2.0 -IC:/msys/1.0/target/lib/gtkmm-2.0/include -IC:/msys/1.0/target/include/gtk-2.0 -IC:/msys/1.0/target/include/gdk-2.0 -IC:/msys/1.0/target/lib/gtk-2.0/include -IC:/msys/1.0/target/include/glib-2.0 -IC:/msys/1.0/target/lib/glib-2.0/include -IC:/msys/1.0/target/lib/sigc++-1.2/include -IC:/msys/1.0/target/include/sigc++-1.2 -IC:/msys/1.0/target/include/pango-1.0 -IC:/msys/1.0/target/include/atk-1.0 -IC:/msys/1.0/local/include -IC:/MinGW/include/mysql \ magecape/*.cc gnuclerk/*.cc src/*.cc \ -LC:/msys/1.0/local/lib -LC:/msys/1.0/target/lib -LC:/MinGW/lib \ -lintl -liconv -lgtkmm-2.0 -lgdkmm-2.0 -latkmm-1.0 -lgtk-win32-2.0 -lpangomm-1.0 -lglibmm-2.0 -lsigc-1.2 -lgdk-win32-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lmysqlclient -lzlib -lwsock32 -lcrypt32 -lm -lsqlplus \ -o gnuclerk # -D LOCALEDIR="\"C:/msys/1.0/local/share/locale/de/LC_MESSAGES\"" The directory `magecape' contains a header file providing the good old _() macro, whereas the `gnuclerk' and `src' directories contain sources that actually use it. Calling this command line, I get the error message: C:\DOKUME~1\markus\LOKALE~1\Temp/ccWmlaaa.o(.text+0x52e):abstractview.cc: undefined reference to `libintl_gettext' C:\DOKUME~1\markus\LOKALE~1\Temp/ccWmlaaa.o(.text+0xbf3):abstractview.cc: undefined reference to `libintl_gettext' C:\DOKUME~1\markus\LOKALE~1\Temp/ccqqoaaa.o(.text+0x68e):customermodel.cc: undefined reference to `libintl_gettext' C:\DOKUME~1\markus\LOKALE~1\Temp/ccqqoaaa.o(.text+0x13cf):customermodel.cc: undefined reference to `libintl_gettext' C:\DOKUME~1\markus\LOKALE~1\Temp/ccArpaaa.o(.text+0xbc8):customerview.cc: undefined reference to `libintl_gettext' C:\DOKUME~1\markus\LOKALE~1\Temp/ccArpaaa.o(.text+0xebb):customerview.cc: more undefined references to `libintl_gettext' follow C:\DOKUME~1\markus\LOKALE~1\Temp/cc0IEaaa.o(.text+0x8c):main.cc: undefined reference to `libintl_bindtextdomain' C:\DOKUME~1\markus\LOKALE~1\Temp/cc0IEaaa.o(.text+0x9c):main.cc: undefined reference to `libintl_textdomain' The only thing I'm sure about is that this error is not caused by my gettext installation: I already wrote a little test program (Internationalized "hello"), and it builds fine with `gcc hello.c -lintl -o hello'. (Well, it doesn't find its .mo file, but this is another problem.) So linking of libintl works in principle. It only doesn't in my command line above. What am I doing wrong? Thanks, Markus |