GTK development on windows

Hi, I have the GTK+ 2.2.4-2 source and I have the GTK+ 2.2.4-2 development environment installed to dev-c++'s directory (the files were gotten from http://sourceforge.net/projects/gtk-win/. I am trying to follow gtk.org’s tutorial on using gtk, but it’s for unix, is there any Windows tutorials? also, with all the stuff installed the ‘chapter 2: getting started’ base.c example program dosen’t compile with gcc base.c -o base ‘gtk-config -cflags -libs’ because it says “gtk-config: no such file or directory”, I think this is because of my innabillity to run ./configure (or my lack of knowledge of where to run it) it dosen’t work with either cygwin, or the normal DOS prompt. I would like to ad UI to my programs, so if anyone knows how to make GTK+ work on windows XP home edition, or knows of another “good/easy” UI dev tool, please respond. thanks…

I haven’t tried compiling a gtk application in widows, but from what I know about Linux, I can tell you, that the gtk-config tells the compiler where to look for the header files and libraries.

So locate the gtk-config application if you have it, execute it
gtk-config --cflags --libs

Take the output and change the gcc commandline accordingly
gcc base.c -o base [output of the gtk-config command without braces]

If you don’t have it you’ll have to find the header files and libraries yourself. Linux output looks like this, you have to locate the appropriate directories and replace them in your command
-I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include
-L/usr/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -lXi -lXext -lX11 -lm

t

Since I don’t have the gtk-config, and I am indeed on windows, and I don’t fully understand this stuff, could you explain the last part, the -I, -L stuff, thanks…

I’m not on Windows, but I do know that you need to get the GTK libraries in your Path.

The development environment installer put all the .h files and stuff into the proper directories, it’s just this gtk-config thing

Dev c++ already have wxwidget installed why you need gtk?

You can find out by reading the excellent documentation of the compiler, linker and other tools that are used to build a program.

With -L you can include a path where the linker can find additional libraries to link with.
With -l you can specify which libraries should be linked with.

I don’t know what wxwidget is, I am just looking for a UI programming program/toolkit whatever, gtk was suggested in a different thread I posted http://blenderartists.org/forum/showthread.php?t=84160 qt was said to be hard to compile to on anything other than linux and it’s c++ (I’ve only done C), from going to opengl.org I got very confused (although my first choice was opengl), and the other KDE, was said to be qt based, so I skipped over that, if anyone knows of any other better/easier to compile on windows, or a good (somewhat simple) resource for opengl, it would be appreciated, thanks

Well for every toolkit you need to set the include and library paths, if you don’t understand how that stuff works, you’ll have a hard time doing anything serious in C…
There’s a site with packages for Dev-C++ though, maybe have a look here:
http://devpaks.org/category.php?category=GTK
Maybe one of them contains some good documentation and examples on how to set it up properly for Dev-C++/MinGW.

wxWidgets is exactly that (without the ‘whatever’ part).