Re: Linux -> win32 cross-compile

On 2002.06.17 09:32 rhaarman ucdavis edu wrote:
> Excuse me if this has been asked already, I haven't been able to find it 
> anywhere. I develop software with GTK as my GUI ToolKit of choice, and I 
> would love for my friends to see my work. However, they run various kinds 
> of Windows, and I can't afford to run a Windows box myself. My question, 
> then, is: Can anyone give me any help on cross-compiling GTK 2 apps from 
> Linux to Windows?

I'm not sure that I can give you specific advice as to your
problems, but I run a linux-x-mingw compile system here for
compiling Gtk2 programs which works very well. There are some
problems using pkg-config in this situation. I have a trivial 
patch for this that I'm plannng to submit but otherwise you can
work around the problem in the application's makefiles.

I attach copies of my build scripts and an application Makefile
in case they are helpful. The cross compiler lives in
/usr/local/cross-tools; My gtk_tree package (just a repackage
of Tor's stuff) lives in ~/vers/gtk_tree (the runtime
sub-directory is copied to the host machines); finally, a copy
of a standard linux compile of pkg-config v0.12 lives in /usr/devel.
You can see the hack to run the output via sed in the application

Some URLs of things I have used:


Ali Harlow                              Email: ali avrc city ac uk
Research programmer                     Tel:   (020) 7040 4348
Applied Vision Research Centre          Intl: +44 20 7040 4348
City University                         Fax:   (020) 7040 5515
London                                  Intl: +44 20 7040 5515

Description: Bourne shell script

Description: Bourne shell script



GTK_CFLAGS:=$(shell PKG_CONFIG_PATH=$(GTK_TREE)/lib/pkgconfig $(PKG_CONFIG) --cflags gtk+-win32-2.0 | sed 's:/target/:$(GTK_TREE)/:g')
GTK_LFLAGS:=$(shell PKG_CONFIG_PATH=$(GTK_TREE)/lib/pkgconfig $(PKG_CONFIG) --libs gtk+-win32-2.0 gthread-2.0 | sed 's:/target/:$(GTK_TREE)/:g')
CFLAGS=-fnative-struct -I $(DCAMSDK)/inc $(GTK_CFLAGS)

OBJS=test.o options.o camera.o

test.exe:   $(OBJS)
	$(CC) -Wl,-Map, $(OBJS) $(DCAM_LIBS) $(LFLAGS) -o test.exe

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