I have created an example.cpp
file in Visual Studio which very simply has one line:
#include <gtk/gtk.h>
I am getting the following error:
cannot open source file "gtk/gtk.h"
Here are the steps I took to setup GTK+.
I downloaded the latest stable version of GTK+ from http://win32builder.gnome.org/ choosing gtk+-bundle_3.10.4-20131202_win64.zip
.
I then followed gtk+-bundle_3.10.4-20131202_win64.README.txt
with the following instructions.
To summarise:
- I added the
bin
folder to my path - Ensured there was no prior version of GTK+ on the system
- Prepared Pango, GDK-Pixbuf and GTK+IMModules
- Verified it worked by running
gtk3-demo
- Verified it was in the system by running
pkg-config --cflags --libs gtk+-3.0
with the output:
-mms-bitfields -IE:/Developer/external/gtk-3.10.4_win64/include/gtk-3.0 -IE:/Developer/external/gtk-3.10.4_win64/include/cairo -IE:/Developer/external/gtk-3.10.4_win64/include/pango-1.0 -IE:/Developer/external/gtk-3.10.4_win64/include/atk-1.0 -IE:/Developer/external/gtk-3.10.4_win64/include/cairo -IE:/Developer/external/gtk-3.10.4_win64/include/pixman-1 -IE:/Developer/external/gtk-3.10.4_win64/include -I/srv/win32builder/fixed_3104/build/win64/include/freetype2 -I/srv/win32builder/fixed_3104/build/win64/include/libxml2 -IE:/Developer/external/gtk-3.10.4_win64/include/libxml2 -I/srv/win32builder/fixed_3104/build/win64/include/freetype2 -IE:/Developer/external/gtk-3.10.4_win64/include/libpng16 -IE:/Developer/external/gtk-3.10.4_win64/include/gdk-pixbuf-2.0 -IE:/Developer/external/gtk-3.10.4_win64/include/libpng16 -IE:/Developer/external/gtk-3.10.4_win64/include/glib-2.0 -IE:/Developer/external/gtk-3.10.4_win64/lib/glib-2.0/include -LE:/Developer/external/gtk-3.10.4_win64/lib -lgtk-3 -lgdk-3 -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid -lwinmm -lz -lpangocairo-1.0 -lpangowin32-1.0 -lgdi32 -lpango-1.0 -lm -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl
where E:/Developer/external/gtk-3.10.4_win64
is where I have extracted the GTK files to.