ROOT and Xcode

When trying to compile the file, which includes ROOT
statements, with the following command line:

g++ .cc src/.cc -o TopCrossSection -I./include -I’root-config
–incdir’‘root-config --glibs’ -std=c++11 -Im

I get the error:
In file included from src/
/include/CrossSection.h:18:10: fatal error: ‘TROOT.h’ file not found
#include <TROOT.h>

whilst I can open ROOT in the current directory, and TROOT.h is included in
my ROOT folder.
It gives the impression that the path to ROOT is missing, but how is this
possible if I can open ROOT in the command line in the current directory?
Thanks for help.

The the following command:

g++ *.cc src/*.cc -o TopCrossSection -I./include `root-config --cflags` `root-config --glibs`

Tried but same result.

Try: `root-config --cxx --cflags` -I./include -o TopCrossSection *.cc src/*.cc `root-config --glibs`

Thanks for the suggestion. Unfortunately not successful.

Then you must have an installation problem. What are the result of:

root-config --cxx --cflags
root-config --glibs
which root.exe


Looks like! although I do not understand what’s wrong.

bash-3.2$ root-config --cxx --cflags
clang++ -pthread -stdlib=libc++ -std=c++11 -m64 -I/Applications/root/include
bash-3.2$ root-config --glibs
-L/Applications/root/lib -lGui -lCore -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lMultiProc -lpthread -stdlib=libc++ -lm -ldl
bash-3.2$ which root.exe
bash-3.2$ echo $ROOTSYS


Tryclang++ *.cc src/*.cc -o TopCrossSection -I./include `root-config --cflags` `root-config --glibs`If it does not work, what doesls -l /Applications/root/includereturns?


bash-3.2$ clang++ .cc src/.cc -o TopCrossSection -I./include 'root-config --cflags ’ ‘root-config --glibs’
clang: error: no such file or directory: 'root-config --cflags ’
clang: error: no such file or directory: ‘root-config --glibs’

ls -l /Applications/root/include returns:
result.txt (105 KB)

Many thanks for noticing this stupid mistake. Now it works!!! Thank you to you all.
Best regards,