Compile standalone program with RooFit

Dear ROOT support,
I’m trying to compile a standalone program that used RooFit.

The compile command is the following:
g++ -g -Wall -m64 -O3 -DLOCAL_ -o ExtractYield root-config --cflags --glibs -lRooFit -lRooFitCore -lMinuit -I …/interface …/src/ …/src/ …/src/

Apparently the compilation is ok, since the output is: In function ‘void MakeFit()’: warning: unused variable ‘SingleCandMC_InAcc_B0bar’

When I try to run, I get the following error:
dyld: Symbol not found: __ZTI14TFoamIntegrand
Referenced from: /Users/mauro/root/lib/
Expected in: dynamic lookup

Trace/BPT trap

I’m running on a Mac OS X, with root version: 5.28/00a
I compiled root with the following command:
./configure macosx64 --enable-roofit --enable-cern --enable-mathcore --enable-mathmore --enable-minuit2 --enable-qt --enable-xml --with-thread-libdir=/usr/lib/libpthread.dylib --with-gsl-incdir=/Users/mauro/GSL_v1.14/include --with-gsl-libdir=/Users/mauro/GSL_v1.14/lib

Thank you very much for your help.
Kind regards,

  • Mauro.


You need to add -lFoam to your link line.