Shared library and MnApplication

Dear Root Guru

Hello, I’m trying to compile a shared library of my class which uses TMinuit2. Following the procedure on the root manual, I have done Link def and rootcint and stuff (step1 to step4) but when I come to load the library, I get the fillowing

root [0] .L TchannelFitter.so     
dlopen error: /.data/data/akira/Analysis/Momo/Core/STFitter/./TchannelFitter.so: undefined symbol: _ZN4ROOT7Minuit213MnApplicationclEjd
Load Error: Failed to load Dynamic link library /.data/data/akira/Analysis/Momo/Core/STFitter/./TchannelFitter.so

According to c++ filt, this is

akira@heppc005 ~/ext/Analysis/Momo/Core/STFitter$ c++filt  _ZN4ROOT7Minuit213MnApplicationclEjd
ROOT::Minuit2::MnApplication::operator()(unsigned int, double)

At this point, I don’t really know what to do. This method should be defined in MnApplication and it is strange that the symbol is not defined for the method.

Could you please give me a clue as to how I should proceed?

Many thanks for your help in advance.

Cheers
Akira

Hi,

before loading your library you probably need to load libMinuit2, do

gSystem->Load(“libMinuit2”);

I hope this helps,

cheers

Lorenzo

Hi,

I have a similar problem in root_v5.16.00. Here is what happens:

root [1] gSystem->Load(“TrivialView.so”);
dlopen error: /opt/root/lib/libGX11TTF.so: undefined symbol: _ZN3TTF11fgSmoothingE
Load Error: Failed to load Dynamic link library /opt/root/lib/libGX11TTF.so
Error in TCint::AutoLoad: failure loading library libGX11TTF.so for class TGX11TTF

It used to work in root_v5.15.06.

It seems that this is also discussed at savannah.cern.ch/bugs/?27631

cheers
Dirk

… the problem can be “solved” in the Makefile
by chaning the order of libraries plugged in:

from

dime@tori:/local/data/OctoSPECT> root-config --libs
-L/opt/root/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -pthread -lm -ldl -rdynamic

dime@tori:/local/data/OctoSPECT> root-config --glibs
-L/opt/root/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lGui -pthread -lm -ldl -rdynamic

to

ROOTLIBS := -L/opt/root/lib -lCore -lCint -lRIO -lGraf -lGraf3d -lNet -lHist -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -pthread -lm -ldl -rdynamic

ROOTGLIBS := -L/opt/root/lib -lCore -lCint -lRIO -lGraf -lGraf3d -lNet -lHist -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lGui -pthread -lm -ldl -rdynamic

Dirk

Thanks for your help

gSystem->Load(“libMinuit2”); did the trick!

Cheers
Akira