Hi Martina, this kind of error occurs when you missed a library in the linker command. The best way to get linker and compiler flags for compiling and linking with Root is the root-config command. root-config --cflags -> yields compiler flags root-config --libs -> yields linker flags I can produce an executable from your source code with the command g++ -o tree_merge tree_merge.cc `root-config --cflags --libs` Hope this helps. best, Kurt On Fri, May 02, 2003 at 01:39:19PM +0200, Schaefer Martina wrote: > Here the error message at compiling (you can see the version of root I > use in it): > > g++ -g -c -o mergetree.o mergetree.cc > -I/afs/cern.ch/sw/root/v3.04.02/rh72_gcc2953/root/include > g++ -o mergetree mergetree.o > -L/afs/cern.ch/sw/root/v3.04.02/rh72_gcc2953/root/lib -lCore -lCint -ldl > -lHist -lMatrix -lGpad -lGraf -lPostscript > mergetree.o: In function `main': > /afs/cern.ch/user/m/mschafer/public/atlas_gjet/merge/mergetree.cc:18: undefined > reference to `TChain::TChain(char const *, char const *)' > /afs/cern.ch/user/m/mschafer/public/atlas_gjet/merge/mergetree.cc:31: undefined > reference to `TChain::~TChain(void)' > /afs/cern.ch/user/m/mschafer/public/atlas_gjet/merge/mergetree.cc:32: undefined > reference to `TChain::~TChain(void)' > collect2: ld returned 1 exit status > make: *** [mergetree] Error 1 -- Kurt Rinnert, University of Karlsruhe (TH) - Faculty for Physics
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:11 MET