This will match GTK 1.2, 2.2, 3.2, etc, which was probably not the intended behaviour. The check should probably something similar to the following: #if GTK_MAJOR_VERSION == 1 && GTK_MINOR_VERSION == 2