2

I'm trying to build gtk3 applications for windows and since Fedora delivers mingw and precompiled libraries for gtk3 for mingw, I used it.

I got the normal compilation working via

i686-mingw32-gcc test.c `pkg-config --cflags --libs gtk+-win32-3.0`

Now I would like to link it statically (Fedora delivers precompiled libraries for that too) but i cannot get it to work. It tryed

i686-mingw32-gcc test.c -static `pkg-config --cflags --libs --static gtk+-win32-3.0`

but it results in

/usr/lib/gcc/i686-pc-mingw32/4.6.1/../../../../i686-pc-mingw32/bin/ld: cannot find -lgtk-3
/usr/lib/gcc/i686-pc-mingw32/4.6.1/../../../../i686-pc-mingw32/bin/ld: cannot find -lgdk-3
/usr/lib/gcc/i686-pc-mingw32/4.6.1/../../../../i686-pc-mingw32/bin/ld: cannot find -lgdk_pixbuf-2.0
/usr/lib/gcc/i686-pc-mingw32/4.6.1/../../../../i686-pc-mingw32/bin/ld: cannot find -lpng14
/usr/lib/gcc/i686-pc-mingw32/4.6.1/../../../../i686-pc-mingw32/bin/ld: cannot find -lffi
razlebe
  • 7,134
  • 6
  • 42
  • 57
  • Are you sure Fedora ships static libs for WinGW32 for GTK+3? I only see them for GTK+2 on the base repos. (Or is that what these `libgtk-3.dll.a` files are for?) – BRPocock Jan 24 '12 at 19:41

1 Answers1

0

AFAIK, static compilation is not supported for GTK+. Anyway, gcc arguments order is important for building with mingw.

ntd
  • 7,372
  • 1
  • 27
  • 44