Re: Compiling ROOT "test" programs on Linux

Pasha Murat (murat@cdfsga.fnal.gov)
Fri, 28 May 1999 15:19:00 -0500 (CDT)


Hi Andre - I guess you need to use `-fno_rtti' flag when compiling your code.
Search ROOT Web site for `rtti'.

Fons and Rene: it looks like people are asking the same question again and
again so it might make sense to fix section "Compiling and Linking with the
ROOT libraries" (in http://root.cern.ch/root/Availability.html) to
specify all the necessary compiler flags in there(first of all -
for Linux).
What do you think? -Pasha
--------------------------------------------------------------------------------
Andre C. McNeill writes:
>
> Peace, I am trying to compile the "test" progams in the test directory
> with gmake, under the Linux operating system, and these are the errors it
> gives me
>
> ______________________________________________________________________________
>
> > gmake
> g++ -shared -g Event.o EventDict.o -o libEvent.so
> g++ -g MainEvent.o Event.o EventDict.o -L/home/andre/root/lib -lNew -lBase
> -lCint -lClib -lCont -lFunc -lGraf -lGraf3d -lHist -lHtml -lMatrix -lMeta
> -lMinuit -lNet -lPostscript -lProof -lTree -lUnix -lZip -lm -ldl -rdynamic
> -o Event
> MainEvent.o: In function `main':
> MainEvent.o(.text+0x263): undefined reference to `TFile::TFile(char const
> *, char const *, char const *, int)'
> MainEvent.o(.text+0x476): undefined reference to `TFile::TFile(char const
> *, char const *, char const *, int)'
> MainEvent.o(.text+0x51e): undefined reference to
> `TDirectory::TDirectory(char const *, char const *, char const *)'
> /home/andre/root/lib/libBase.so: undefined reference to `__log1p'
> collect2: ld returned 1 exit status
> gmake: *** [Event] Error 1
> ______________________________________________________________________________
>
> Can anyone explain why it is not recognizing the TFile or TDirectory
> declarations from the TDirectory.h in the MainEvent.cxx file?
>
> Thank you for your time. Peace.
>
> Andre McNeill