Add permanently a directory to the include path

Dear all,
I managed to solve the following problem:

Error in : The file IV.C can not be found in the include path:[/quote]
by adding in my script:


The code of the script looks like this:

{ gROOT->Reset(); gSystem->AddIncludePath("-I/Users/mbomben/work/root_macros"); gSystem->CompileMacro("IV.C"); gSystem->Load(""); double alpha; IV("/Users/bomben/work/RD50/Natascha/newPetaseccaLow/ninp_fei4_3pixels_fluence\=2e+15_bias\=2000_RD50_PX2_Current_pruned.dat","SIMU",50e-8,200e-4,130,253.15,2e15,alpha); }

My questions is the following: is it possible to add permanently (via .rootrc?) that directory to my root installation, please? Or have I to add it to the path every time a create a new script that wants to use that library?

Many thanks in advance and best regards,
Marco Bomben

Hi marco,

You could set up a “rootlogon” script. See e.g. Step by step rootlogon.C


Hi Marco,

You also create a .rootrc in your home directory containing[code]# Path used to find macros.

Paths are different for Unix and Windows. The example shows the defaults

for all ROOT applications for either Unix or Windows.

Unix..Root.MacroPath: .:$(ROOTSYS)/macros:/var/tmp/mm
.Root.MacroPath: .;$(ROOTSYS)/macros;/Users/mbomben/work/root_macros
[/code]and use (instead of calling CompileMacro directly)gROOT->LoadMacro("IV.C+");


Philippe, I think he (also?) wants: # Add additional include directives for ACLiC compilations. #ACLiC.IncludePaths: -I/where/the/includes/are

Indeed Pepe, indeed :slight_smile:


Thank you all!
Fixing ACLiC.IncludePaths did the magic.
Thanks again and best regards,
Marco Bomben