Building GTK+ and Dependencies on Win32
Try the MinGW build
Having failed multiple times with the auto* tools build on win32 (which
usually works quite flawless on *NIX) I have done another attempt
following
Owen's nice description. Trying to repeat some month later the MinGW
guys have removed the MingGW-3.2.x.exe and established a new installation.
So the old (working) description is only of
historic interest. Let's try again
Installation
Here are my notes about differences:
- using ming-3.2.0-rc3, installed to d:\mingw
- msys to d:\msys\1.0 normalizing msys result looks
promising

(Maybe I've missed that with all my previous attempts)
- msysdtk to d:\msys\1.0
- from
tml's site using the "bleeding edge", that is glib-2.6.4.zip,
pkgconfig-0.15.zip, libiconv-1.9.1.bin.woe32.zip, gettext-runtime-0.13.1.zip
- (not libgw32c-0.4-lib.zip), but the other extra libs ... to d:\gtk.
- Faked gtk-doc
cd gtk-doc
cp gtk-doc.m4 /gtk/share/aclocal
cp gtkdocize /gtk/bin
mkdir -p /gtk/share/gtk-doc/data/
cp gtk-doc.make /gtk/share/gtk-doc/data
- export CVSROOT=:pserver:hans@cvs.gnome.org:/cvs/gnome
or if you don't have a gnome cvs account
export CVSROOT=:pserver:anonymous@anoncvs.gnome.org:/cvs/gnome
- cvs get -r pango-1-8 pango (something with make install was broken there), so
cvs up -A (to get HEAD, which worked)
- cvs get -r atk
Building atk from cvs is
broken for me
but there is
help (patching tools;) or simply use the
prebuilt packages
- cvs get -r gtk-2-6 gtk+
./autogen.sh --prefix=/gtk --with-gdktarget=win32
(without forciong the target you'll get complaints about Pango/X being required)
- Now you should be able to run gtk-demo.

If not you should try
/gtk/bin/pango-querymodules > /gtk/etc/pango/pango.modules
and it finally works for me ;-) Because looking at gtk-demo
is not that productive let's go for a real
application
-
If nothing works as described you may want to try the
gtk+/mingw build instructions from the
real expert.
Need for Speed
Another way - and still my preferred - is to use the Micro$oft toolchain. This may be a little tedious
cause sometimes the extra makefiles get out of sync. But with a little more manual work you
can gain a lot of cpu cycles.
Still Not Enough?
The described dependencies are almost enough to compile Dia,
which has some extra code to optionally not depend on freetype. But if you plan to build
The GIMP there is some more required. At least you need Pango/FT2 which requires
fontconfig
and freetype2.
For me this was the point where I lost fun in building it all myself [2] ;)
So go download
freetype and fontconfig
pre-built packages
Bloated or Rich of Features?
If you think current GTK+ is bloated you may want to take a look at
gtk+1.3.
Otherwise - especially if you think it's too fast and lloks ugly - you may be interested in
the upcoming version.
[1] In general it is a bad idea to mix different C-ruintimes in one program.
The official C-runtime for all of GTK+ is msvcrt.dll which came with vc 5.0 up to vc 6.0 and
can be considered as part of the operating system.
[2] I've tried to explain
the trouble
which using two font engines in one program is. Also I tried
to work around it
one way or
another but finally
threre was too much resistance or maybe my reasons are just
not convincing enough,
i.e. noone cares for some extra seconds start-up time and even
not
about some random brokeness.