Note: These instructions are intended for developers wanting to develop applications based on GTK+, not for end-users.
GTK+ requires Windows Vista or later.
For older versions of Windows, you should do a custom build of older versions of GLib and GTK+.
Installing GTK+ and its dependencies
The easiest way to install GTK+ and its dependencies in binary form is through the MSYS2 project. MSYS2 provides a UNIX-like development environment for Windows. It provides packages for many software applications and libraries, including the GTK+ stack. These packages are installed using the pacman package manager.
Note: in the following steps, we'll assume you're using a 64-bit Windows. Therefore, the package names include the
x86_64 architecture identifier. If you're using a 32-bit Windows, please adapt the instructions below using the
i686 architecture identifier.
Step 1: Install MSYS2
Download the MSYS2 installer that matches your platform and follow the installation instructions.
Step 2: Install GTK+3 and its dependencies
Open a MSYS2 shell, and run:
pacman -S mingw-w64-x86_64-gtk3
Step 3 (recommended): Install GTK+ core applications
Glade is a GUI designer for GTK+. It lets you design your GUI and export it in XML format.
You can then import your GUI from your code using the
GtkBuilder API. Read the
GtkBuilder section in the GTK+ manual for more information.
To install Glade:
pacman -S mingw-w64-x86_64-glade
Devhelp is a help browser. It lets you easily navigate offline in the GTK+, glib and gobject API help relative to the version of these libraries installed on your system.
To install Devhelp:
pacman -S mingw-w64-x86_64-devhelp
Step 4 (optional): Install the Python bindings
If you want to develop a GTK+3 application in Python, you need to install the Python bindings.
If you develop in Python 3:
pacman -S mingw-w64-x86_64-python3-gobject
If you develop in Python 2:
pacman -S mingw-w64-x86_64-python2-gobject
Step 5 (optional): Install build tools
If you want to develop a GTK+3 application in other languages like C, C++, Fortran, etc, you'll need a compiler like gcc and other development tools:
pacman -S mingw-w64-x86_64-toolchain base-devel
Building and distributing your application
Building your application with MSYS2
You may use MSYS2 to build your GTK+ application and create an installer to distribute it. Your installer will need to ship your application build artifacts as well as GTK+ binaries and runtime dependencies.
Building your application with Visual Studio
GTK+ releases provide project files for Microsoft Visual Studio. You can use them to build GTK+ itself and use it in your own project. Learn more on how to build the GTK+ stack using Microsoft Visual Studio and read these other tips on how to build GTK+ with MSVC on Windows.
Distributing GTK+ with your application
You are welcome to redistribute GTK+ binaries, including applications that bundle them, on other web sites, CD-ROM, and other media. You don't have to ask for permission. That's one of the points of Free Software. One important thing that the GNU licenses require is that you must also redistribute the source code. This usually means at least the gettext, GLib, GTK+, Pango and Atk sources.
List of GTK+ dependencies
GTK+ depends on several libraries:
To run GTK+ programs you will also need: