Best practices for installing GTK + in Windows
TheGTK + version: 2.16.0
Prerequisites: cygwin has been installed on Windows (the installation method is not described in this article)
There are many ways to install GTK + on Windows. The simplest method is to install GTK + using an integrated package. The steps are as follows:
1. Download gtk0000-bundle_0000.0-20090317_win32.zip
Address: http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.16/gtk+-bundle_2.16.0-20090317_win32.zip
2) decompress the package to the specified directory
I decompress the package to C:/GTK.
3) set the environment variable path
"My Computer" -- Right-click "property" -- "advanced" -- "environment variable", edit path, and add:
C:/GTK/bin
4) test
4.1) ensure that GTK + of other versions is not installed in windows. Run the following command on the CMD command line:
PKG-config -- cflags GTK ++-2.0
Display result:
Note: if there are other versions, delete them first.
4.2) Verify that the installation is correct (no need to write helloworld)
Run the following command on the CMD command line:
GTK-demo
Display result:
So far, the installation is complete.
To use Microsoft's Windows theme engine, create a new file named gtkrc under the ETC/gtk-2.0 directory under the installation directory with only one sentence:
GTK-theme-name = "MS-Windows"
Save and exit.
Everything is OK.