Re: [ROOT] Problem of compilation

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Sep 12 2002 - 19:49:54 MEST


Hi,
You are using a version of Root compiled with gcc2.95 and your default
compiler is egcs1.1 or vice-versa.
Check with g++ -v

Rene Brun

On Thu, 12 Sep 2002, therin wrote:

> Hi, I write for a problem of compilation.
> Firstable, I arrived to compile the files which are in the repertory
> /root/test/ with ROOT 3.03/03. But when I want to compile a file c++
> construct from a NTuple and MakeClass function (ntp1.C), it doesn't
> work. The message error is :
> 
> g++ -O -Wall -fPIC -D_REENTRANT -I/usr/local/root/new/root/include -c
> ntp1.C
> g++ -O  ntp1.o -L/usr/local/root/new/root/lib -lCore -lCint -lHist
> -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lm
> -ldl -lpthread -rdynamic  \
>            -o ntp1
> ntp1.o: In function `ntp1::ntp1(TTree *)':
> ntp1.o(.text+0x5d): undefined reference to `TFile::TFile(char const *,
> char const *, char const *, int)'
> collect2: ld returned 1 exit status
> make: *** [ntp1] Error 1
> 
> With Cint, I can execute ntp1.C without problems. I added to verify in
> ntp1.C :
> 
> int main(int argc,char **argv)
> {
>  ntp1 j;
>  j.Loop();
> }
> 
> I hope you can tell me what is going wrong.
> 
> Thanks for your help.
> 



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:09 MET