Shared library won't load inside script

Hi guys,

A wrote a script which depends on a couple of classes that are in a shared library. I tried gSystem->Load() and gROOT->ProcessLine() to load the files in the script.

void LUX10EventViewer(){ gROOT->ProcessLine(".L libLux_EVT.so"); //gSystem->Load("libLux_EVT.so"); new LUX10Viewer(); }
I got

root [0] .x LUX10EventViewer.C 
Error: Symbol Lux_EVT_Event is not defined in current scope  LUX10EventViewer.C:460:
Error: Symbol event is not defined in current scope  LUX10EventViewer.C:460:
*** Interpreter error recovered ***

However, if I first use gSystem->Load in the interactive mode not in the script it works.

root [0] gSystem->Load("libLux_EVT.so");
root [1] .x LUX10EventViewer.C          
root [2] j0n0@j0n0-laptop:~/Desktop/testing/GUI$ 

It works. How do I get it load the shared library within the script?

Thanks in advance,
Surge

in the subdirectory where you work (i.e. where you run your script), create a simple “rootlogon.C” file:

{
gSystem->Load(“libLux_EVT”);
}