Root on MacOS problem

Hi all.
I’ve installed ROOT 5.17/02 on MacOS X 10.4.10 with gcc 4.0.1.
I’ve also installed roofit, and it does work online, but the compiler doesn’t recognize roofit commands in c++ codes. This is what it seems.

Can you help me, please?

Here’s the logfile as attach.

well, it seems attaching oesn’t work.
I’m going to post the first part of it…

g++ -g -D_REENTRANT -I/Users/Gianninnn/work/root/include Bcount_new.cpp ProgressMeter.o nB_fitter.o -O2 -L/Users/Gianninnn/work/root/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint
-lPostscript -lMatrix -lPhysics -lfreetype -lpthread -lm -ldl -lMinuit -lHtml -lRooFit -o Bcount_new.exe
/usr/bin/ld: Undefined symbols:
RooArgList::RooArgList(RooAbsArg const&, char const*)
RooArgList::RooArgList(RooArgSet const&)
RooArgList::~RooArgList()
RooChi2Var::RooChi2Var(char const*, char const*, RooAbsPdf&, RooDataHist&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdAr
g const&, RooCmdArg const&)
RooChi2Var::~RooChi2Var()
RooRealVar::setVal(double)
RooRealVar::RooRealVar(char const*, char const*, double, double, char const*)
RooRealVar::RooRealVar(char const*, char const*, double, double, double, char const*)
RooRealVar::~RooRealVar()
RooDataHist::RooDataHist(char const*, char const*, RooArgList const&, TH1 const*, double)
RooDataHist::~RooDataHist()
RooSetProxy::~RooSetProxy()
RooAICRegistry::~RooAICRegistry()
RooFit::Components(char const*)
RooFit::DataError(RooAbsData::ErrorType)
RooFit::LineColor(short)

it continues this way with all roofit commands.

What happened?

You must link with “-lRoofit -lRoofitCore”

Rene

thanks so much. Now it seems to go on, but I’ve got a new error.
I don’t need to add -lRoofitCore on linux. Maybe there is some other library i’ve got to link?
That’s what I have.

gcc -MM -g -D_REENTRANT -I/Users/Gianninnn/work/root/include Bcount_new.cpp > Bcount_new.d; sed s/.o:/.exe:/g Bcount_new.d > tmp.sed; mv tmp.sed Bcount_new.d
g++ -g -D_REENTRANT -I/Users/Gianninnn/work/root/include Bcount_new.cpp ProgressMeter.o nB_fitter.o -O2 -L/Users/Gianninnn/work/root/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lfreetype -lpthread -lm -ldl -lMinuit -lHtml -lRoofit -lRoofitCore -o Bcount_new.exe
/usr/bin/ld: Undefined symbols:
TThread::Run(void*)
TThread::Join(void**)
TThread::TThread(void* ()(void), void*, TThread::EPriority)
collect2: ld returned 1 exit status
make: *** [Bcount_new.exe] Error 1

I also have problems with TTree commands. Is it because i shift to MacOs, or it’s the new root release?

Thank you very much again!

you also need -lThread.

Philippe

When you see an unsatisfied reference (eg TThread) go to the reference guide
root.cern.ch/root/html/ClassIndex.html
go to the class (alphabetic order), for TThread it is
root.cern.ch/root/html/TThread.html

Move your mouse to the top right corner of the page and you will see in which library this class is implemented (in this case libThread). So add -lThread to your link list.

Rene