GTK+ for Windows

binaries and source code


This page is intended to guide you through the process of building the whole GTK+ stack (and a few additional libraries required by HexChat) on Windows using Visual C++ a.k.a. MSVC, version 12 that comes with Visual Studio 2013. It is largely based on Chun-wei Fan’s Compiling the GTK+ stack using Visual C++. Thanks!

You can also skip the building process and right off just download and use the Visual C++ builds of GTK+ so that you don’t have to spend a lot of time on getting it to work like we had. So without further ado:

GTK+ Visual C++ Builds:

This is the redistributable and a bundle of all the GTK+ stuff. This is most likely what you need.

Microsoft Visual C++ Redistributable Package 2013 32 bit 64 bit
GTK+ bundle 2.24.24 32 bit 64 bit

Building from Source

Building GTK+ and its dependencies on Windows has never been easier. We have a PowerShell script which does most of the work for you, so you just have to wait until it finishes. But first of all, here’s the dependency graph of the GTK+ stack.

GTK dependency graph

To compile all this yourself, you need to install:

When you’re done installing these, you also have to clone the GTK-Win32 repo to C:\mozilla-build\hexchat\github\gtk-win32.

You can use other paths, but then make sure to feed gtk-win32\build.ps1 with the correct parameters (open the script with an editor for examples).

Now you have to allow PowerShell scripts to be run on your system. Open a PowerShell prompt as Administrator and run the following command:

Set-ExecutionPolicy RemoteSigned

Once done, close this elevated shell, and run PowerShell as a regular user. Go to the gtk-win32 repo root and start building with the script. The example below will perform a default build for x86:

cd C:\mozilla-build\hexchat\github\gtk-win32
.\build.ps1 -Configuration x86

Once ready, your GTK+ stack will be found under C:\mozilla-build\hexchat\gtk. Enjoy!


ATK 2.14.0 Source
cairo 1.14.0 Source
Enchant 1.6.0 Source
Fontconfig 2.8.0 Source
FreeType 2.5.3 Source
GDK-PixBuf 2.30.7 Source
gettext-runtime 0.18 Source
GLib 2.42.1 Source
GTK+ 2.24.25 Source
HarfBuzz 0.9.36 Source
libffi 3.0.13 Source
libpng 1.6.14 Source
libxml2 2.9.1 Source
OpenSSL 1.0.1j Source
Pango 1.36.8 Source
Pixman 0.32.6 Source
win-iconv 0.0.6 Source
zlib 1.2.8 Source