I have a shared library, libMyCorrelator.so, that compiles and links just fine, but when I try to load it into CINT, I get this error message:
dlopen error: /u/home/s/swissel/lib/libMyCorrelator.so: undefined symbol: _ZN4ROOT17TGenericClassInfoC1EPKcS2_iRKSt9type_infoPKNS_13TInitBehaviorEPvPFvvEP16TVirtualIsAProxyii
I suspect that I need to load a ROOT library prior to loading my library, but I can’t figure out which one. I’ve tried all the ones included in the the linking step, which by the way, looks like this:
g++ -shared -g -g -m64 MyCorrelator.o corrDict.o -L/u/local/apps/cern_root/5.34.18/lib/root -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic -lMathMore -lMinuit -L/rh5stuff/64bit/lib -L/usr/lib64 -L/u/home/s/swissel/lib -lRootFftwWrapper -lfftw3 -L/u/local/gcc/4.4.4/libs/fftw/3.2.2_shared/lib -L/u/home/s/swissel/hooverCode/analysis_code/classes -L/u/home/s/swissel/hooverCode -o libMyCorrelator.so
I am also loading a few other libraries prior to loading my library:
gSystem->Load("libfftw3.so");
gSystem->Load("libGraf");
gSystem->Load("libCore");
gSystem->Load("libProof");
gSystem->Load("libMathMore.so");
gSystem->Load("libPhysics.so");
gSystem->Load("/u/home/s/swissel/lib/libRootFftwWrapper.so");
gSystem->Load("libAnitaEvent.so");
gSystem->Load("libMyCorrelator.so");
I did a grep in my library director for the missing symbol, and found that corrDict.o includes the symbol. I’ll attach corrDict.cxx and corrDict.h to this post.
corrDict.C (136 KB)
corrDict.h (6.21 KB)
Any suggestions?