Re: [ROOT] linking programs in $ROOTSYS/test

From: Andre Holzner (Andre.Holzner@cern.ch)
Date: Tue Feb 20 2001 - 17:29:49 MET


Kai Koehler wrote:
> 
> Hi there !
> 
> I might be able to precise my problem, I described this morning (as
> "Norbert Danneberg") in "problems compiling routines containing TFILE"
> now.
> 
> Something must be wrong with my configuration, because here is what I
> get from $ROOTSYS/test> gmake   :
> 
> g++ -O -Wall -fPIC -I/usr/root/include -c Event.cxx
> In file included from /usr/root/include/Rtypes.h:18,
>                  from /usr/root/include/TObject.h:23,
>                  from /usr/root/include/TNamed.h:18,
>                  from /usr/root/include/TRandom.h:18,
>                  from Event.cxx:65:
> /usr/root/include/RConfig.h:89: warning: `__i486__' redefined
> *Initialization*:1: warning: this is the location of the previous
> definition
> g++ -O -Wall -fPIC -I/usr/root/include -c EventDict.cxx
> In file included from /usr/root/include/Rtypes.h:18,
>                  from /usr/root/include/TObject.h:23,
>                  from /usr/root/include/TNamed.h:18,
>                  from /usr/root/include/TDirectory.h:17,
>                  from /usr/root/include/TROOT.h:21,
>                  from EventDict.h:26,
>                  from EventDict.cxx:5:
> /usr/root/include/RConfig.h:89: warning: `__i486__' redefined
> *Initialization*:1: warning: this is the location of the previous
> definition
> ...............AND SO ON................
> g++ -shared -g Event.o EventDict.o -o libEvent.so
> g++ -g MainEvent.o Event.o EventDict.o -L/usr/root/lib -lNew -lCore
> -lCint -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix
> -lPhysics -lm -ldl -rdynamic -o Event
> MainEvent.o: In function `main':
> MainEvent.o(.text+0x707): undefined reference to `TFile::TFile(char
> const *, char const *, char const *, int)'
> MainEvent.o(.text+0x9d5): undefined reference to `TFile::TFile(char
> const *, char const *, char const *, int)'
> MainEvent.o(.text+0xafe): undefined reference to
> `TDirectory::TDirectory(char const *, char const *, char const *)'
> collect2: ld returned 1 exit status
> gmake: *** [Event] Error 1
> 

Hi,

I get similar errors (about missing symbols) when trying to do a 
(g)make in $ROOTSYS/test on a Suse 6.4 and Suse 7.0 system 
using ROOT compiled on a Suse 6.3 system.

Compiling the examples on the 6.3 system works without problems.

I just tried a gmake in $ROOTSYS/test with root compiled 
on a 7.0 system -- this compiles and links without problems.

I suggest you to recompile root on the new system.


hope this helps,

André

-- 
------------------+----------------------------------
Andre Holzner     | +41 22 76 76750 
Bureau 32 2-C13   | Building 32     
CERN              | Office 2-C13    
CH-1211 Geneve 23 | http://wwweth.cern.ch/~holzner/



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:37 MET