From: Alan M. E. <am...@ex...> - 2010-06-15 18:34:18
|
I'm using MinGW32 on Fedora 13 host. (Hope this is the right place to ask this...) I'm tinkering with compiling an application that statically links to glib. I believe that I've installed all of the relevant Fedora packages to do it. My test program is: #include <glib.h> int main() { g_print("Hello, World!\n"); return 0; } I figure that if availability of static compilation is meaningful at all then it should be possible with this file. I've tried many things, and my current attempt looks like: $ i686-pc-mingw32-gcc -DGLIB_STATIC_COMPILATION -DGOBJECT_STATIC_COMPILATION glib_test.c -o glib_test.exe `mingw32-pkg-config --cflags --libs glib-2.0` -static /usr/i686-pc-mingw32/sys-root/mingw/lib/libglib-2.0.a(gutils.o):(.text+0x2a3): undefined reference to `_CoTaskMemFree@4' /usr/i686-pc-mingw32/sys-root/mingw/lib/libglib-2.0.a(gutils.o):(.text+0xa90): undefined reference to `_CoTaskMemFree@4' /usr/i686-pc-mingw32/sys-root/mingw/lib/libglib-2.0.a(gutils.o):(.text+0xb30): undefined reference to `_CoTaskMemFree@4' /usr/i686-pc-mingw32/sys-root/mingw/lib/libintl.a(dcigettext.o):(.text+0x7ba): undefined reference to `_libiconv' /usr/i686-pc-mingw32/sys-root/mingw/lib/libintl.a(dcigettext.o):(.text+0x9a4): undefined reference to `_libiconv_open' /usr/i686-pc-mingw32/sys-root/mingw/lib/libintl.a(dcigettext.o):(.text+0xa47): undefined reference to `_libiconv_open' /usr/i686-pc-mingw32/sys-root/mingw/lib/libintl.a(relocatable.o):(.text+0x114): undefined reference to `_libiconv_set_relocation_prefix' collect2: ld returned 1 exit status What Am I missing? -Alan |