How do you install GTK+ 3.0 on Windows?

NOP da CALL picture NOP da CALL · Sep 19, 2015 · Viewed 47.5k times · Source

Trying to setup GTK+ 3.0 on Codeblocks Win7. Having some trouble finding exactly how to do this.

The GTK website directs you to msys2. It seems there was once a direct download on the GTK site for an all-in-one Windows bundle that is no longer there.

Having followed the instructions, installed and updated msys2, I see no reference to GTK+, in the installed files or on the mysys website that GTK directs you to.

Its seems very linuxy in terms of being unnecessarily and stupidly unclear to do something that should be simple. Maybe im missing something but should it not be as simple as downloading a zipped folder, extracting and setting up paths?

At this rate id be faster learning C++ and going with Qt.

The question is in the title, I am amazed I am having to ask the question, it seems like one that google should have completely covered but everything I am finding is relating to a download that is no longer available on the GTK website. I can find no info regarding msys2 and GTK+ 3.0.

Thanks in advance.

Answer

andlabs picture andlabs · Sep 19, 2015

Welcome, Google users from the future! Since I wrote this answer, the GTK+ website now has official installation instructions that cover what I said below but with more details and less pain. Refer to that page instead. The answer below has been kept for historical reasons.

The problem with the GTK+ website is that there is no one to maintain these binary distributions. The previous binary distribution for Windows was for GTK+ 3.6, which was released I believe way back in 2012, if not earlier. The current version is 3.16, and 3.18 is literally days away from being released. MSYS2 is the only supported installation mechanism, and it's updated frequently enough.

That being said, you need to install GTK+ separately if you use the MSYS route; MSYS doesn't come with GTK+ out of the box. Start with

pacman -Ss gtk3

That should give you a list of possible packages to install, including the GTK+ libraries for both 32-bit and 64-bit MinGW. I forget their exact names now.

Once you find the one you want, use

pacman -S package-name-here

to install it. Then, open the MinGW 32-bit or 64-bit Shell from the Start menu's MSYS folder to begin developing.

If you want a traditional IDE for GTK+ programming, look up GNOME Builder or Anjuta. For a graphical GUI designer, look up Glade.