Include in cint

I installed root in a custom directory (/data/Install/root) in my laptop. When i tried to use ROOT::Math::gaussian_cdf function. I met this error

Error: cannot open file "../lib/" /data/Install/root/include/root/Math/SpecFuncMathCore.h:32: *** Interpreter error recovered ***
Seems the problem is that from the head files to the lib it need to use “…/…/lib/root/” because both head file and lib are installed in a “root” sub directory of “include” and “lib” directory. I can change the code by hand to make it works. But I’m wondering if I can avoid this problem in the installation? Thanks.

Is it possible that you do not set the required system variables before you try to run ROOT?
In your “xterm”, do:
cd /data/Install/root
source ./bin/thisroot.[c]sh
Then cd to your working directory and try to start “root”.

Hi Pepe Le Pew, Thanks for your suggestion. But I tried your method, the problem persists. I have no problem using the usual classes/functions like TH1F and those in TMath. But when I try to use those defined in $ROOTSYS/include/root/Math and need to load a library, the code will complain that the library can not be found.

I find setting the directories explicitly

--prefix=/data/Install/root --incdir=/data/Install/root/include --libdir=/data/Install/root/lib --datadir=/data/Install/root/share --macrodir=/data/Install/root/macros --tutdir=/data/Install/root/tutorial --testdir=/data/Install/root/test

in configuration before compiling can solve the problem. But seems a little bit clumsy.

Instead of setting all subdirectories explicitly, simply follow my initial post in:

Thanks, Pepe Le Pew. That’s cool… so elegant!