Dear ROOT fellows
it occured to me that when I add a TSpectrum in my application, I need to add -lSpectrum by hand, since ‘root-config --libs’ won’t list it. What is the reason for this? Is this explained somewhere?
Thanks,
Thomas
Dear ROOT fellows
it occured to me that when I add a TSpectrum in my application, I need to add -lSpectrum by hand, since ‘root-config --libs’ won’t list it. What is the reason for this? Is this explained somewhere?
Thanks,
Thomas
Thomas,
We have about 100 shared libs in total. The default root-config --libs include only the minimal but frequently used subset.
When running in an interactive session, the interpreter can automatically load shared libraries referenced by a class. For example the following
root > TSpectrum s
will automatically trigger the dynamic linking of libSpectrum.
However, when called from a compiled script or program, you must make sure that the library is linked before using classes from this library, ie
root > gSystem->Load("libSpectrum");
root > .x somecode.C+
o
r specify -lSpectrum in your link sequence if you build your own executable.
Rene