I got a Hello World tutorial here: http://developer.gnome.org/gtk-tutorial/stable/c39.html#SEC-HELLOWORLD for working with Visual C ++ 10 in 32-bit version of Windows 7. Here are the steps that I went through (assuming you installed GTK + in C:\GTK+ ):
Go to Properties / Configuration Properties / Debugging and add it to the environment
PATH=%PATH%;C:\GTK+\bin
Go to Properties / Configuration Properties / C / C ++ / General and add Include to Additional Directories (I'm sure there is a better way to do this, but it works):
C:\GTK+\include\gtk-2.0;C:\GTK+\include\glib-2.0;C:\GTK+\lib\glib-2.0\include;C:\GTK+\include\cairo;C:\GTK+\include\pango-1.0;C:\GTK+\include\gtk-2.0\gdk;C:\GTK+\lib\gtk-2.0\include;C:\GTK+\include\gdk-pixbuf-2.0;C:\GTK+\include\atk-1.0
Properties / Configuration Properties / Linker / General and add additional library dependencies:
C:\GTK+\lib
Finally Properties / Configuration / Linker / Input:
gtk-win32-2.0.lib;gdk-win32-2.0.lib;atk-1.0.lib;gdk_pixbuf-2.0.lib;pangowin32-1.0.lib;pangocairo-1.0.lib;pango-1.0.lib;cairo.lib;gthread-2.0.lib;gobject-2.0.lib;gmodule-2.0.lib;glib-2.0.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
This worked for the Hello World tutorial, but I feel that if you use more commands there might be some libraries / headers that I forgot. This should provide a good foundation, although for any programming with GTK + in Visual C ++
Anthony
source share