[GtkGLExt] HOWTO build gtkglext-1.2 and gtkglextmm-1.2 under Windows with MinGW and MSys
- From: Andrew Speirs <andrew_speirs yahoo com>
- To: gtkglext-list gnome org
- Subject: [GtkGLExt] HOWTO build gtkglext-1.2 and gtkglextmm-1.2 under Windows with MinGW and MSys
- Date: Wed, 29 Mar 2006 23:52:50 -0800 (PST)
Greetings,
I have recently managed to build both packages for
Windows using the MinGW and MSys environemnt and
wanted share my experience. If the environment is
carefully set-up, it works just like under Linux. I
ran into two errors, which are described below. I
fixed them manually, but someone who knows more about
patches/diff than I do can create the necessary
changes.
I have all packages installed in e:\devel\gtk\ In
theory gtk, gtkmm, gtkglext and gtkglextmm could go
into their own directories which could then be
resolved by mapping directories in the etc/fstab file
of MSys (see below) or editting the pkg-config
configuration files as necessary. This is left as an
exercise for the reader ;-)
Here are the steps I used:
1. Dowload, install gtk-2.8.10 and gtkmm-2.8.3-1
Best to use Win32 installer for gtkmm, linked from
gtkmm.org download page. You will also find a link for
the gladewin32 installer to install gtk.
Install GTK first. I installed everything into base
directory e:\devel\gtk\ but this is somewhat arbitrary
and can be compensated for later in MSys. These
*should* set the required Windows environment
variables.
2. Install/Configure MingW and MSys (adapted from
http://mail.gnome.org/archives/gtk-devel-list/2005-January/msg00091.html)
Install MingW first using installer for
MingW-3.0.0-1.exe. I read somewhere that the "current"
installer is broken, so use "previous", then upgrade
everything in Candidate/gcc-3.4 and Candidate/binutils
which is simply unzipping into the MingW directory
(e:\devel\mingw). Install latest MSys (1.0.10) into
its own directory (e:\devel\msys) and MSysDTK (1.0.1)
into MSys directory. During MSys install allow it to
configure with MingW. Upgrade libtool with latest
binutils at gnuwin32.sourceforge.net/packages.html
since libtool version from msys is "too old".
Create/edit etc/fstab gtk/bin/libtoolize and
~/.profile files from MSys command (e.g. with vi)
following instructions from Steps 2 to 4 from the link
above, making sure paths are correct for your
installation e.g. Step 3 editting fstab: c:\gtk /gtk
change c:\gtk to, in my case, e:\devel\gtk
Also create pkg-config.sh as instructed in Step 4
(this is also where I define PKG_CONFIG_PATH with the
export command).
Now- you will likely have prefix=/target in ALL the
pkg-config config files (gtk/lib/pkgconfig/*.pc) If
this is the case, the -I commands output from
pkg-config will resolve to eg. /target/include, same
for -L. Simply create a link: ln -s /e/devel/gtk
/target
3. Build GtkGLExt-1.2.0
The change notice indicates that bug was fixed dealing
with separate pangox library- this doesn't seem to be
part of the win32 build, so delete all references to
pangox in the configure file.
Now run ./configure --build=i386-pc-mingw32
--enable-debug=yes
then run make
Due to the symbolic linking, all libraries, includes,
pkg-config .pc files, demos etc. should end up in the
gtk/ directory structure automatically. E.g.
libgtkglext-win32-1.0.dll.a is in e:\devel\gtk\lib
where expected. You can now build projects against
gtkglext-1.2.0
4. Build gtkglextmm-1.2
Everything should work here the same way. Make sure
mingw runtime supports large files (LFS)- unzip latest
mingw-runtime bin download into mingw directory which
should take care of this.
Run configure (specify â??prefix=/gtk) â?? there seems
to be an error in tools/extra_defs_gen/Makefile: about
line 113, LDFLAGS = -L /gtk/lib â?? note the space
will cause an error, so delete. Then run make and make
install.
5. I use dev-cpp to build on Windows (note this is a
gui for mingw). Run pkg-config to get the required
flags to paste into Project Options/Parameters/C or
C++ compiler flags and linker flags. E.g.
>>pkg-config --cflags gtkglextmm-1.2
I find that I get a linker error regarding vtable
<class> cannot be auto-imported when building agains
gtkglextmm. Adding -Wl,--enable-runtime-pseudo-reloc
to the linker parameters seems to solve the problem.
This can also be added to gtkglextmm-win32-1.2.pc
file.
Hope this helps.
Andrew
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]