Sorry guys,
I cannot think a better title to describe my problem. You can find my codes in the attachment.
Basically, I have compiled a shared library called libXMan. It contains only three classes: XObject, XDetector, XPMTs. I also have a root script called test.C. It uses one function in XDetector to get the pointer to XPMTs:
XDetector::GetInnerPMTs();
To run the ROOT script test.C one has to at first generate the shared lib by (in Linux):
$ make
libXMan.so and libXMan.rootmap should be created in the directory. One then has to set up the LD_LIBRARY_PATH:
$ export LD_LIBRARAY_PATH=/path/to/src:$LD_LIBRARY_PATH
Here comes my problem: if I load the lib by hand before I run test.C everything is OK. If I let the system to find out the lib by itself, I get many error messages:
root
root [0] gSystem->Load("./libXMan.so")
(int)0
root [1] .x test.C
root [2] .q
root
root [0] .x test.C
Error: Function P010_TPad() is not defined in current scope test.C:5:
*** Interpreter error recovered ***
Error: Function P010_TGX11() is not defined in current scope test.C:5:
*** Interpreter error recovered ***
Error: Function P020_TGX11TTF() is not defined in current scope test.C:5:
*** Interpreter error recovered ***
Error: Function P030_TGWin32() is not defined in current scope test.C:5:
*** Interpreter error recovered ***
Error: Function P040_TGQt() is not defined in current scope test.C:5:
*** Interpreter error recovered ***
Error: Function P010_TRootGuiFactory() is not defined in current scope test.C:5:
*** Interpreter error recovered ***
Error: Function P020_TQtRootGuiFactory() is not defined in current scope test.C:5:
*** Interpreter error recovered ***
If I comment out const XPMTs *innerPMTs = xmass800kg->GetInnerPMTs(); in test.C everything is OK.
Could you please check it out?
Thanks,
Jing
src.tar.gz (2.65 KB)