Re: Cross Compiling GTK+ (almost, i hope)



Matias Torres writes:
 > i unpack every single win32-zip-file i found in
 > ftp://ftp.gtk.org/pub/gtk/v2.8/win32.

You probably want to be using the newest versions of glib 2.12 and
pango 1.14 instead. (And gtk+ 2.10 once the next (source) release of
that is done, after which I will produce Win32 binaries.)

 > i586-mingw32msvc-gcc -o helloworld `pkg-config --libs --cflags gtk+-2.0` helloworld.c

You should pass the CFLAGS and LIBS separately. CFLAGS goes before the
source files, and LIBS goes *after*. With gcc on Linux it doesn't
matter, but the order and position of libraries on the command line
*does* matter with gcc on Windows. Also with traditional Unix
compilers is is important.

I would also spell out the .exe.

I.e., what you want is:

i586-mingw32msvc-gcc -o helloworld.exe `pkg-config --cflags gtk+-2.0` helloworld.c `pkg-config --libs gtk+-2.0`

--tml




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]