Re: [ROOT] compiling trouble

From: daan (hubert@hep.iihe.ac.be)
Date: Wed Apr 28 2004 - 15:43:17 MEST


that's right.

i used another compiler, and now it works...



On Wed, 28 Apr 2004, Rene Brun wrote:

> Daan,
>
> This is the typical symptom of compiling your code with a version
> of ROOT or/and gcc and linking it with a ROOT version compiled
> with a different compiler.
>
> Rene Brun
>
> On Tue,
> 27 Apr 2004, daan wrote:
>
> > Hi,
> >
> > I have some code that needs to be compiled with TFile.h and TTree.h
> > included.
> >
> > When I compile on my own machine (SuSe 8.0, gcc 2.95.3) everything is
> > fine. But when i use another machine (debian, gcc 2.95.4) the comilation
> > gets stuck where a root object is constructed or deleted
> >
> > 42:  TFile *outfile = new TFile (argv[2], "RECREATE");
> > 46:  TTree *tree = new TTree("nnfit", "NN result");
> > 91:  return 0;
> >
> > output of compilation
> >
> > g++ -g `root-config --cflags`
> > -I/cms/external/lcg/external/root/3.10.01/rh73_gcc32/include -c
> > nn2rootflux.cc
> > g++ nn2rootflux.o `root-config --libs`
> > -I/cms/external/lcg/external/root/3.10.01/rh73_gcc32/include -o
> > ../../bin/nn2rootflux
> > nn2rootflux.o: In function `main':
> > /beo1/hubert/photonics_fit/src/nn2rootflux/nn2rootflux.cc:42: undefined
> > reference to `TObject::operator new(unsigned int)'
> > /beo1/hubert/photonics_fit/src/nn2rootflux/nn2rootflux.cc:42: undefined
> > reference to `TFile::TFile(char const *, char const *, char const *, int)'
> > /beo1/hubert/photonics_fit/src/nn2rootflux/nn2rootflux.cc:42: undefined
> > reference to `TObject::operator delete(void *)'
> > /beo1/hubert/photonics_fit/src/nn2rootflux/nn2rootflux.cc:46: undefined
> > reference to `TObject::operator new(unsigned int)'
> > /beo1/hubert/photonics_fit/src/nn2rootflux/nn2rootflux.cc:46: undefined
> > reference to `TTree::TTree(char const *, char const *, int)'
> > /beo1/hubert/photonics_fit/src/nn2rootflux/nn2rootflux.cc:46: undefined
> > reference to `TObject::operator delete(void *)'
> > /beo1/hubert/photonics_fit/src/nn2rootflux/nn2rootflux.cc:91: undefined
> > reference to `TObject::operator delete(void *)'
> > /beo1/hubert/photonics_fit/src/nn2rootflux/nn2rootflux.cc:91: undefined
> > reference to `TObject::operator delete(void *)'
> > collect2: ld returned 1 exit status
> > make: *** [../../bin/nn2rootflux] Error 1
> >
> >
> > what happens? and what can i do about it?
> >
> > thanks!
> >
> >
> > daan
> >
>
>
>



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:07 MET