Problems with setting the includepath

Hello ROOT-experts,

I want to work with OpenCv (2.4.10) inside of ROOT but have problems with setting up the includepath.
I have a little script setting up OpenCV and loading the libraries works just fine, but when I try to include
some of the opencv-headers, I get a “file not found”.
I am trying to set the includepath with gSystem->AddIncludePath(…) in the script.
Manually including the headers with .include on the root-shell works fine.

My machine is a MacBook Pro OS X 10.10.2; ROOT 6.03/2 .

Is there a way to make the includepath “/opt/local/include/” an inlcudepath permanent for every root session?

Thanks for any suggestions!

Kind regards,


Hi Marc,

there is an environment variable you can use for this purpose: ROOT_INCLUDE_PATH.

export ROOT_INCLUDE_PATH=/my/path1:/my/path2


1 Like

Hi Danilo,

thank you… works!