Building CoreGTK on OS X (10.11)

Here is a quick guide to building CoreGTK and CoreGTK applications on OS X (10.11).

Step 1) Install Xcode

You’ll need Xcode which you can grab right from the AppStore.

Step 2) Install Command Line Tools

Once Xcode is installed you’ll need to also add the command line tools. The easiest way to do that is to open a terminal and run:

xcode-select --install

Step 3) Accept Xcode license

You can do this by either opening Xcode itself or from the command line by running:

sudo xcodebuild -license

Step 4) Install X11 server

As Apple is no longer actively maintaining their own X11 server they’ve spun it off into a community maintained project. You can grab the latest version at

Step 5) Install GTK+

If you head over to and hit the Download link and then the Mac OS X link you’ll find a page that gives the official, recommended, approach for getting GTK+ onto your OS X system.

That said if you’re like me those instructions won’t work at all and so here is my “non-recommended”, but working, approach to install GTK+ using Mac Ports. So to install this using Mac Ports first head over to the Mac Ports website at and click the Download link. Once it is installed you can open a terminal and run

sudo port -v selfupdate

to update the repository list. Next you can install GTK+ 3 by running:

sudo port install gtk3

Step 6) Check out and build CoreGTK

The last step is to simply check out CoreGTK and try building it. To make things easy I’ve included the steps here:

git clone
cd coregtk/src
make mac

Happy programming!

CoreGTK running on OS X 10.11

CoreGTK running on OS X 10.11

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>