Setting include path in root

hi all

i was wondering how to set the include path in root. i saw this discussion:

root.cern.ch/root/roottalk/roottalk04/0941.html

which provides a solution. is there a way to do this in the code?

the usecase is this: i have a macro in which i want to include a file called “fitTools.C” which is in a certain path “mypath”.

i would like to do something like:

#include "TROOT.h"
gSystem->SetIncludePath( " -I/mypath/ " );
#include “fitTools.C”

but it gives these errors:

error: expected constructor, destructor, or type conversion before ‘->’ token
error: ‘gSystem’ was not declared in this scope

what do i have to do to make this work?

f

Hi,

Will it satisfactory for you if you put the line

in the rootlogon.C. I did this way and it worked.
Is it important for you that line to be in your macro?

Thanks rafo