Use Xcode to develop GATB-Core softwares

This article explains how to configure the Xcode IDE to work on GATB-Core based projects, either GATB-Core library or GATB-Tools.

Preliminary comment

There is no requirement to use Xcode to develop source code on Mac OSX. However, it is a very well featured develoment platform as it is fully designed for Apple’s computers.


To handle the development cycle of GATB-Core projects, you need:

  • Mac OSX (10.9+) based computers
  • CMake 3.1.0 or later
  • Xcode

Install Xcode

Download and install Xcode.

By default, only the latest release of Xcode is provided through this link. If you need a previous version of Xcode that is valid for your version of OSX, follow this link (requires an Apple Developer ID).

Prepare GATB-Core source code

Note: what is written here for GATB-Core also applies for a GATB-Tool project.

If you have already worked with GATB source code, you may have done this:

cd <some-directory>

git clone
WARNING: read-only repository. If you intend to commit code
(e.g. Inria developers), clone from Inria Forge.

cd gatb-core/gatb-core

mkdir build ; cd build

Important note: if you already have such a ‘build’ directory (e.g. you develop using ‘cmake’ with ‘make’) you should either delete it or use a different build folder.

Then, you run CMake as follows to prepare the project for Xcode integration:

cmake -G "Xcode" -D CMAKE_BUILD_TYPE=Debug ..

Finally, you DO NOT run make to compile GATB-Core: we are going to that in Xcode.

Import GATB-Core into Xcode

This is very, very easy:

  • go to menu “File”
  • select “Open…”
  • navigate to¬† “~/devel/build” and select “gatb-core.xcodeproj”
  • click on [Open]

The Xcode “Project Explorer” now contains a project called: “gatb-core”.

Now, compile GATB-Core for the first time:

  • go to menu “Project”
  • select “Build”


From here, you should have everything to work on and compile c++ codes.

Tips and tricks

We have two folders of interest within the “Project Explorer” of Xcode (left side panel):

Debugging GATB-Core code

Xcode provides an integrated GUI-based debugger. Please, refer to Xcode documentation to review how to use it.



Comments are closed