Re: Setting up GTK+ on Windows using Mingw



> Should I just untar the whole bundle, and move it into my mingw directory ?

(I assume you mean "unzip" and not "untar", if you are talking about
the gtk+ bundles on ftp.gnome.org? And BTW, don't use "Winzip". It
tries to be too clever and can actually be dangerous. Just use the
built-in zip archive handling in XP's Explorer, or the separate
command-line unzip command.)

No, don't move it into the mingw directory. Keep it separate. It is
never a good idea to mix up stuff from separate sources in the same
place on Windows.

After that you just need to set the PKG_CONFIG_PATH environment
variable to point to the $foo/lib/pkgconfig folder (where $foo is
where you unpacked the bundle), add $foo/bin to your PATH, and you can
run pkg-config --cflags gtk+-2.0 and check what it outputs. If
everything looks good, you should be able to compile a
single-source-file GTK+ program with:

    gcc -o foo.exe `pkg-config --cflags gtk+-2.0` foo.c `pkg-config
--libs gtk+-2.0`

just like on Unix. Etc. Obviously you wouldn't actually want to type
that manually every time you compile, so use Makefiles, scripts or
whatever.

> preferably, alter
> the http://www.gtk.org/download-windows.html page to describe the
> installation of the packages on MingW/Msys in some more detail ?

Well, it is kinda assumed that people interested in developing
GTK+-using software have a broad understanding of concepts like
pkg-config, make, shell commands, environment variables PATH and
PKG_CONFIG_PATH etc.

For people who really don't have a clue about stuff like that, a MinGW
and MSYS based approach with command-line tools is never going to work
anyway. They want some kind of IDE. Eventually there will hopefully be
something one can plug into Visual Studio.

--tml


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