Step 1: Download the installation package on the GTK official website. There are 32-bit and 64-bit, 64-bit have this sentence:
Note that these 64-bit packages is experimental. Binary compatibility between versions is not guaranteed.
or choose to download the 32-bit. Select the All-in-one bundle and all the dependencies are here.
Step 2: Unzip to the specified directory.
The extracted path is: I:\Program Files (x86) \GTK, where the GTK folder is created by itself, in order to avoid the case, try to ensure that the folder does not have spaces.
Step 3: Add environment variables
Edit Windows environment variables: computer--Properties--Advanced system settings--environment variables. Add the following path: I:\Program Files (x86) \gtk.
Step 4: Configure GTK +
C:\users\administrator>pkg-config--cflags gtk+-3.0
The result is:
-MMS-BITFIELDS-II:/Program\ Files\ (x86)/Gtk/Include/GTK-3.0-II:/Program\ Files\ (x86)/Gtk/Include/CAIRO-II:/Program\ Files\ (x86)/Gtk/Include/PANGO-1.0-II:/Program\ Files\ (x86)/Gtk/Include/ATK-1.0-II:/Program\ Files\ (x86)/Gtk/Include/CAIRO-II:/Program\ Files\ (x86)/Gtk/Include/Pixman-1-Ii.:/program\ files\ (x86)/Gtk/INCLUDE-II:/Program\ Files\ (x86)/Gtk/Include/FREETYPE2-II:/Program\ Files\ (x86)/Gtk/INCLUDE-II:/Program\ Files\ (x86)/Gtk/Include/LIBPNG15-II:/Program\ Files\ (x86)/Gtk/Include/GDK-PIXBUF-2.0-II:/Program\ Files\ (x86)/Gtk/include/LIBPNG15-II:/Program\ Files\ (x86)/Gtk/Include/GLIB-2.0-II:/program\ files\ (x86)/Gtk/Lib/glib-2.0/Include
Step 5: Verifying the installation
C:\users\administrator>gtk3-demo
If GTK + Code demos is present, the installation OK is indicated.
Installing GTK + under Windows