Compilation of GTK+ 3.0 in Windows

Version: 2017-05-14

This web site explains how I can easily compile the GTK+ 3.0 libraries and related libraries on Microsoft Windows. There are other web sites explaining how to build the GTK+ library, but usually they require all sorts of tools. This web site tries to simplify the building process and avoid the using of special versions of the libraries.

Generally I have created or modified CMake files for most of the libraries. At the moment some libraries (like gtk, glib) have fixed Visual Studio solution files and therefore the following preliminary steps must be performed. (I would like to generate CMake files for these libraries as well, as time permits.)

Preliminary steps

In the following section very detailed instructions will be given at the beginning, since you may have never used the CMake program. Later on the explanation is not so detailed.

Compiling glib and prerequisites

intl library

You can download the intl library from the official web site or use my local repository.
Copy the contents of the ZIP file into the installation directory.
There are no compilation instructions for this library at the moment.

zlib library

Explanations to the files in zlib-1.2.8-ivanyi.zip

Although CMake configuration files (CMakelists.txt) are available with the library by default, however there are some problems with them. The following changes are applied to it:

Configuration in CMake

Building process

pcre library

Configuration in CMake

Building process

ffi library

Explanations to the files in ffi-3.2.1-ivanyi.zip

Configuration in CMake

Building process

Theoretically the building of the library should be easy and simple, however Thus this means that we have to change the two options manually in the Visual Studio. Therefore to build the library, the following change should be applied to the solution: The solution can be built in the usual way.

glib library

Explanations to the files in glib-2.52.1-ivanyi.zip

At the moment this is a replication of the Visual Studio project files. The CMakeLists.txt files will be checked and adjusted, so the project can compile on Linux as well.

Configuration in CMake

Building process

Compiling gtk+ and prerequisites

libpng library

Configuration in CMake

Building process

libjpeg-turbo library

Configuration in CMake

Building process

jasper library

Configuration in CMake

Building process

tiff library

Configuration in CMake

Building process

pixman library

Configuration in CMake

Building process

cairo library

Configuration in CMake

Building process

atk library

Configuration in CMake

Building process

pango library

Configuration in CMake

Building process

gdk-pixbuf library

libepoxy library

gtk+ library


Copyright © 2017 Péter Iványi