Re: mingw32



On Mon, 25 Aug 2003, Eduardo Lütz wrote:

Straight to the point: where can I find detailed information on
how to compile a C GTK+ program to work in Windows (crosscompilation
from Linux or anything else)?

I don't have detailed information written up, but here's something
that might help you get started. When cross-compiling, one very
important thing is strictly separating the native and the cross
versions of all tools and resources.  I have my mingw32 cross-compiler
and gtk+-win32 files all under /opt/cross-tools.

I use gtk 2.2, which uses pkg-config, and it's necessary to set the
PKG_CONFIG_PATH variable correctly, e.g.

CROSSDIR = /opt/cross-tools
PKG_CONFIG_PATH = $(CROSSDIR)/mingw32/lib/pkgconfig

Then you can do things like:

GTKLIBS := $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \
            pkg-config --libs gtk+-win32-2.0)

in your Makefiles.

Also:

MGW_PREFIX = mingw32
CC = $(MGW_PREFIX)-gcc -Wall -O2 -mms-bitfields

--
Allin Cottrell
Department of Economics
Wake Forest University, NC



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