Re: Setting up GTK+ on Windows using Mingw



Gorshkov wrote:
John Smith wrote:
On Wed, May 14, 2008 at 1:25 PM, Tor Lillqvist <tml iki fi> wrote:
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
If you mean by "broad" a very basic knowledge of those things then I am
ready to go.  Even so it still takes me longer to figure out some things
related to this thread.  I can very much relate to some of those who
have participated in this thread.  I might not be totally in the dark
but I do find that many times instructions are written for the experts
and sometimes leave out small details that might not be so obvious
for non-experts.

Well, all the more thanks for having the patience to explain it to me
anyway, then.
That is why I liked my old boss in the group where I worked on some
multiplatform software and had to learn a lot about some of the unix
tools.  He was always patient with me in explaining things that might
be obvious to the experts like him.


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
Now having some experience in both sides (Borland IDE and command line
gcc) I will have to disagree.  I am convinced that for those who have at
least some willingness to learn, that the above approach is very much
within reach for beginners if they are presented with information that
doesn't just scare them away.

So who actually needs an IDE? I'm using emacs (which performs 99% of an IDE's functions, and I'm using it precicely because it allows me to have the same setup in windows that I do under linux.
you sound like my old boss.

Considering the response to this thread, I am inclined to try to make a
collection of things that helped me get started on this subject.  Maybe
this will be useful to others like me.

As a minimum I would suggest that anyone wanting to get started with GTK
on Windows do the following.  With these items I was able to get started
learning GTK and do some sample programming.  I just tested my own
instructions by wiping my computer and following my instructions.

1.  from http://www.mingw.org/download.shtml click on
    Sourceforge File Release  and get
    a. Automated MinGW Installer
    b. from MSYS Base System, the Current Release: MSYS-1.0.10.exe
       installer
    c. from MSYS Supplementary Tools, the Current Release:
       msysDTK-1.0.1.exe installer

2.  from http://gladewin32.sourceforge.net/ get
    a.  Gtk+ 2.12.9 Development Environment Revision 2
    b.  Glade 3.4.3 for Windows Revision 1 (zip)

3.  from http://cairographics.org/releases/ get pixman-0.10.0.tar.gz
    without pixman,
    $ pkg-config --cflags --libs gtk+-2.0
    gives this error
    Package pixman-1 was not found in the pkg-config search path.

4.  get gtkmm http://www.gustin.be/win32/gtkmm-win32-2.12.7.zip
    I found this one in the gtkmm list
    http://mail.gnome.org/archives/gtkmm-list/2008-April/msg00020.html

5.  from http://www.icewalkers.com/Linux/Software/56940/libglade.html
    get libglade-2.6.2
    Even though item 2a above comes with libglade, the libglade has a
    bug in the windows environment that will cause a runtime error "The
    procedure entry point glade_xml_construct_from_buffer could not be
    located in the dynamic link library libglade-2.0-0.dll".  With a
    little Googling I found that was fixed  but the fix isn't in the
    the windows installer.

6.  install MinGW.  in the choose components, select g++ compiler in
    addition to what is already selected.  do not select mingw make.
    you will notice during the msys postinstall, a funny message
    indicating that msys does not like the mingw make
    "Oh joy, you do not have c:/MinGW/bin/make.exe. Keep it that way."

7.  install msys
8.  install msysDTK
9.  install Gtk.  I installed it in c:\GTK
10. using msys, unzip and untar pixman.  I put it in /d/pixman-0.10.0
11. using msys, build pixman with
    cd /d/pixman-0.10.0
    ./configure --prefix=/c/GTK
    make
    make install

    If everything worked this far, then
    pkg-config --cflags --libs gtk+-2.0 should give a string of compile
    options and not the error message about pkg-config search path.

12. unzip Glade then copy the 4 folders into c:\GTK
13. unzip gtkmm-win32 and copy the 4 folders into c:\GTK
14. using msys, unzip and untar libglade.  I put it in /d/libglade-2.6.2
15. Edit D:\libglade-2.6.2\glade\glade.def.  add line
	glade_xml_construct_from_buffer
16. using msys, build libglade with
    cd /d/libglade-2.6.2
    ./configure --prefix=/c/GTK
    make
    make install

I found a libglade tutorial at
http://www.micahcarrick.com/12-24-2007/gtk-glade-tutorial-part-1.html

libglademm
http://www.pebble.org.uk/programming/libglademm_simple

http://ftp.gnome.org/pub/GNOME/sources/libglademm/2.6/


Damon Register


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