Using ROOT libraries on Xcode 6.1

I’ve already installed ROOT5.34 (with MacPorts) on my Mac Book and now I’m trying to make libraries available on Xcode. I’ve tried this solution ( but had some troubles, the code did not compile and the settings were too much advanced for me (I don’t have a deep knowledge of Xcode and I’ve never used cmake before). I also tried to follow advices in there ([url]Using Apple Xcode 3.0 as IDE but same error.

So now I’m trying to include libraries in a standard command line project; I added the search paths for headers (…/root/include folder) and libraries (…/root/lib folder) in the Build Settings panel of the project and also every single library found in “lib” folder (.so filename extension) in the Build Phases panel (under “link binary with libraries”) and my code compiles correctly, but when I try to launch it the only output I receive is

dyld: loaded: /Users/luigipertoldi/Library/Developer/Xcode/DerivedData/Particle_Reco_1.0-fqsivyawudegxwexmkthxtuenvmh/Build/Products/Debug/Particle Reco 1.0 dyld: loaded: /Applications/ dyld: unloaded: /Users/luigipertoldi/Library/Developer/Xcode/DerivedData/Particle_Reco_1.0-fqsivyawudegxwexmkthxtuenvmh/Build/Products/Debug/Particle Reco 1.0 dyld: unloaded: /Applications/ dyld: Library not loaded: @rpath/ Referenced from: /Users/luigipertoldi/Library/Developer/Xcode/DerivedData/Particle_Reco_1.0-fqsivyawudegxwexmkthxtuenvmh/Build/Products/Debug/Particle Reco 1.0 Reason: image not found (lldb)

It’s clear that I’m forgetting to link something.

The question is: could someone explain to me how to correctly include ROOT libraries in a standard command line project? Running on OS X 10.10 and Xcode 6.1.

Thank you,


How I solved the problem:

  1. Setting the search paths to the directory of the INSTALLED ROOT, not simply the downloaded and unpacked one.

  2. Anyway the program crash when using the “Write()” function anywhere in the code, solved not including the “” library, which evidently generates the issue.

Hello, can you send me a compiled Xcode root example project, if you can, I hope you can send me a copy (, appreciate it,thanks