Hi Dan, If you create your own executable module, you should provide the list of ROOT libs required for the operation. To see the list of necessary libs, type root-config --glibs or better, use directly root-config as follows: g++ -Wall K2RTree.C GetAvPedestal.cc -o get_av_ped -I/usr/local/cern/root_v3.01.06/include -I. `root-config --glibs` or `root-config --cflags --glibs` to specify the list of compile and link options in a machine independent way. Using the root-config utility has the advantage that if we had one more lib, you do not have to change your procedure. Rene Brun On Sun, 3 Mar 2002 dandwyer@socrates.Berkeley.EDU wrote: > > Hi, > > I'm trying to turn a working root macro into a compiled executable. > It compliles fine, but I am receiving some 'undefined symbol' errors > when dynamically linking libTreePlayer.so during execution. Here is > the error output: > > ------------------ > > $ ./get_av_ped ../chopped/crate5.root outfile2.root > dlopen error: /usr/local/cern/root/lib/libTreePlayer.so: undefined symbol: Copy__8TFormulaR7TObject > Load Error: Failed to load Dynamic link library /usr/local/cern/root/lib/libTreePlayer.so > Error in <TFile::TFile>: file crate5.root does not exist > dlopen error: /usr/local/cern/root/lib/libGpad.so: undefined symbol: __ti10TPaveLabel > Load Error: Failed to load Dynamic link library /usr/local/cern/root/lib/libGpad.so > > *** Break *** segmentation violation > Aborted (core dumped) > > ------------------- > > If it helps, I am using root v3.01.06, and here is the compile line: > > $ g++ -Wall K2RTree.C GetAvPedestal.cc -o get_av_ped -I/usr/local/cern/root_v3.01.06/include -I. -L/usr/local/cern/root_v3.01.06/lib -lTree -lCore -lCint -ldl > > (Compiles without problem) > > Thanks, > Dan Dwyer >
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:43 MET