Error with RooFit with ROOT installed from a pre-compiled distribution

Hi,
I use Ubuntu and I have installed Root version 6.22.00 from a pre-compiled distribution. It works good but I have problems with Roofit, even from the declaration of a variable via RooRealVar: I have written in different ways such as

RooRealVar x(“x”,“x”,0.20,0.80) ;
RooRealVar mu(“mu”,“mu”,1.0,0.5,1.5);

as explained in the manual, but I have the following error:

(.text+0x437): undefined reference to `RooRealVar::RooRealVar(char const*, char const*, double, double, char const*)’

Do I have to configure or add something in Root installation?
Thanks in advance

Riccardo

Have you “#include” the relevant include files in you code ?
I guess @moneta can help.

Hi,

It is also possible that your pre-compiled distributions has benn built without Roofit support.
Try from the ROOT prompt
gSystem->Load("libRooFit")
If it does not work then you need to either build from source with roofit support

Cheers

Lorenzo

Thank you very much, it solved the problem!
thanks again!!

Riccardo