there are several ways to tackle this.
I don’t think the usage of wildcards is possible in link statements. On the other hand you can load all of your libraries with a several gSystem->Load(myLibName) statements.
Or, alternatively, build a string with all the names of the libraries and then use gInterpreter->ProcessLine(…) to execute it.
Hi,
maybe I didn’t mention an important point, I’m not using CINT, I’m using compiled code.
I tried your solution but then when I run the makefile I get the following message:
clang++ -ansi -pedantic -Wall -Wextra -m64 -O3 -o ExtractYieldroot-config --cflags --glibs-lMinuit -lRooFit -lRooFitCore -lFoam -I ../interface ../src/B0KstMuMuSingleCandTreeContent.cc ../src/B0KstMuMuTreeContent.cc ../src/ReadParameters.cc ../src/Utils.cc -D"ROOFIT" ExtractYield.cc Undefined symbols for architecture x86_64: "vtable for RooAngleSPdf", referenced from: RooAngleSPdf::RooAngleSPdf() in ExtractYield-b47b4f.o NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. "vtable for Roo_AngleSPdf", referenced from: Roo_AngleSPdf::Roo_AngleSPdf() in ExtractYield-b47b4f.o NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [ExtractYield] Error 1
At compile time the compiler doesn’t knot that I’ll load the library with gSystem->Load(myLibName).
Ie compile the source file as part of the library. And likely unrelated, in general, dependent files should show up in front of dependencies in link lines. Does that help?
Ouch - sorry, you are right, this is missing the dictionary that we delete after linking the ACLiC library. So you’ll indeed need to link against RooAngleSPdf_cxx.so:
Then I would like to call that very same library on anther program and I would like to use the same calling sequence, which is: (string, string, RooArgSet(...))
But if I do this I get the following error message:
clang++ -ansi -pedantic -Wall -Wextra -m64 -O3 -o ExtractYieldroot-config --cflags --glibs-lMinuit -lRooFit -lRooFitCore -lFoam -I ../interface ../src/B0KstMuMuSingleCandTreeContent.cc ../src/B0KstMuMuTreeContent.cc ../src/ReadParameters.cc ../src/Utils.cc RooAngleSPdf.cxx -D"ROOFIT" ExtractYield.cc ExtractYield.cc:947:23: error: no matching constructor for initialization of 'RooAngleSPdf' AnglesPDF = new RooAngleSPdf("AngleS","AngleS",RooArgSet(*VarsAng,*VarsPoly)); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./RooAngleSPdf.h:24:3: note: candidate constructor not viable: requires at most 2 arguments, but 3 were provided RooAngleSPdf(const RooAngleSPdf& other, const char* name=0) ; ^ ./RooAngleSPdf.h:18:3: note: candidate constructor not viable: requires 0 arguments, but 3 were provided RooAngleSPdf() {} ; ^ ./RooAngleSPdf.h:19:3: note: candidate constructor not viable: requires 6 arguments, but 3 were provided RooAngleSPdf(const char *name, const char *title, ^ 1 error generated. make: *** [ExtractYield] Error 1
It’s like the generated code does not understand RooArgSet, is there a way to avoid this ?
We need the response by @Lorenzo_Moneta or @moneta (he seems to be using two user names these days). He gets notified by mentioning him; let’s hope he finds the time to reply. Please keep pinging and mentioning him until he replies.
I’m attaching the generated code.
Do I simply need to add the lines: RooAngleSPdf(const char *name, const char *title, const RooArgSet&);
in RooAngleSPdf.h
and Roo_AnglesPDFPdf(const char *name, const char *title, const RooArgSet&);
in Roo_AnglesPDFPdf.h ?