Re: gtkmm mingw cross compile



On Nov 12, 2007 5:11 PM, Bruce Sherwood <Bruce_Sherwood ncsu edu> wrote:

"Download the binary installer for the development version of gtk+ and
install into C:\MinGW. At http://gladewin32.sourceforge.net, you need
the development version, which includes such things as glib, atk, pango,
cairo, glade, and fontconfig.

Download the binary installer for the development version of gtkmm and
install into C:\MinGW. At http://ftp.gnome.org/pub/gnome/binaries/win32
in the gtkmm directory, you need gtkmm-win32-devel-xxxx.exe."

Thanks for this Bruce.  I did try something like this before, but
I had some problems.  This time I was a little more persistent with
this approach and I got something working.  I'll try to write up a more
detailed description, but basically what I did to get a cross compiler
working was:

install wine
download the gtkmm-win32-devel-xxxx.exe and run it under wine
created a symbolic link from
    $HOME/.wine/drive_c/Program Files/GTK2-Runtime -> /target
CC=/opt/cross-tools/i386-mingw32msvc/bin/gcc
CXX=/opt/cross-tools/i386-mingw32msvc/bin/g++
PKG_CONFIG_PATH=$HOME/.wine/drive_c/Program\ Files/GTK2-Runtime/lib/pkgconfig
cd /tmp/gtkmm-2.10.11/examples/tictactoe
make

I got this error:
libtool: link: cannot find the library `../../gtk/gtkmm/libgtkmm- 2.4.la' or unhandled argument `../../gtk/gtkmm/libgtkmm-2.4.la'

so I tried manually linking:

/opt/cross-tools/i386-mingw32msvc/bin/g++  -g -O2 -Wall   -o ttt_test.exe  ttt_test.o tictactoe.o `pkg-config --libs gtkmm-2.4`

This worked!  I'd still like to find a solution that didn't use
wine and it would be nice to be able to cross compile all of
gtkmm dependencies without errors, but at least I have
a solution now.  :)
 
 

David L wrote:
> I have been cross compiling gtk apps from Linux to
> for win32 for years using mingw, but every time I've
> tried to do the same with gtkmm, I've run into one
> kind of problem or another.
>
> Can somebody help me improve a script that creates
> a Linux -> win32 cross-compiling environment for gtk
> to make it work for gtkmm too?



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