首先去官方下载:

//官方网站
http://www.gtk.org/download/index.php

//下载链接
http://www.tarnyko.net/repo/gtk3_build_system/gtk+-bundle_3.6.4-20130513_win32.zip
http://www.tarnyko.net/repo/gtk3_build_system/gtk+-bundle_3.6.4-20130513_win64.zip

http://www.tarnyko.net/dl/gtk.htm

解压到c盘:例如:c:gtk
请输入图片描述

看懂英文的话,那个文本文档里有安装说明。

复制代码
'''
To use it, create some empty folder like "c:gtk", Using either
Windows Explorer's built-in zip file management, or the command-line
unzip.exe, available for instance at
ftp://tug.ctan.org/tex-archive/tools/zip/info-zip/WIN32/unz552xN.exe
unzip this bundle. Avoid Winzip! It is known to behave oddly.

(But you presumably already did extract the files, as you are reading
this file.)

Then add the bin folder to your PATH. Make sure you have no other
versions of GTK+ in PATH. Run:

pkg-config --cflags gtk+-3.0

and verify that it prints out something reasonable. Prepare Pango :

pango-querymodules > c:\gtk\etc\pango\pango.modules

Prepare GDK-Pixbuf :

gdk-pixbuf-query-loaders > c:\gtk\lib\gdk-pixbuf-2.0\2.10.0\loaders.cache

Prepare GTK+-IMModules :

gtk-query-immodules-3.0 > c:\gtk\lib\gtk-3.0\3.0.0\immodules.cache

Run:

gtk3-demo

and verify that it works.
'''
复制代码
修改系统变量:
把gtk的路径添加到系统路径中
请输入图片描述

重启电脑。运行:pkg-config --cflags gtk+-3.0
请输入图片描述

出现此界面则说明安装成功。

运行bin/gtk3-demo.exe.或者(运行gtk3-demo)
请输入图片描述

出现界面:
请输入图片描述