linking with glib-2.0 fails on mingw
Tor Lillqvist <[email protected]>
| Newsgroups | gmane.comp.video.gimp.windows.devel |
|---|---|
| Message-ID | <[email protected]> |
Daniel writes: > $ gcc -otest `pkg-config.exe --cflags glib-2.0 --libs glib-2.0` -Ld:/msys-1/home/gnome/lib slist-test.c If yo do it like that, you get the libraries becore the source files on the gcc command line. Libraries should be last. This is true for all Unix-style compilers in general on all platforms, AFAIK. Also, you are forgetting the --fnative-struct swith. It might not matter for GLib only, but if you use GTK+, you must compile your code with that. gcc -fnative-struct -otest `pkg-config.exe --cflags glib-2.0 slist-test.c `pkg-config --libs glib-2.0` --tml