I did not understand the first question you asked me in your mail. I can tell you there is no binary file ntp1 in output. thanks. - environment variables $LD_LIBRARY_PATH /usr/local/root/new/root/lib:/afs/in2p3.fr/home/throng/babar/lib/@sys:/usr/local/oracle/prod/lib:/usr/local/lib [/afs/in2p3.fr/home/t/therin/anal-13/workdir/test $PATH /usr/local/root/new/root/bin:. :/afs/in2p3.fr/home/t/therin :/afs/in2p3.fr/throng/babar/util: /afs/.in2p3.fr/system/@sys/usr/local/parasoft/insure/bin.linux2: /afs/in2p3.fr/throng/babar/bin.linux:./bin/Linux2: /afs/in2p3.fr/home/throng/babar/dist/releases/current/bin/Linux2: /usr/afsws/bin:/usr/afsws/etc: /usr/local/bin:/usr/local/shared/bin:/bin: /sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin: /opt/ssh/bin:/opt/ssf/bin:/var/spool/ucron/bin: /cern/pro/bin:/afs/in2p3.fr/home/t/therin/bin: /afs/in2p3.fr/home/throng/babar/bin.linux:/afs/in2p3.fr/home/throng/babar/bin:/lib:. - error message : g++ -v -O -Wall -fPIC -D_REENTRANT -I/usr/local/root/new/root/include -c ntp1.C Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.91.66/specs gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release) /usr/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.91.66/cpp -lang-c++ -v -I/usr/local/root/new/root/include -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -D__ELF__ -Dunix -Di386 -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__i386__ -D__linux__ -D__unix -D__i386 -D__linux -Asystem(posix) -D__EXCEPTIONS -D__OPTIMIZE__ -Wall -Asystem(unix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di686 -Dpentiumpro -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__ -D__PIC__ -D__pic__ -D_REENTRANT ntp1.C /tmp/ccT962ck.ii GNU CPP version egcs-2.91.66 19990314 (egcs-1.1.2 release) (i386 Linux/ELF) #include "..." search starts here: #include <...> search starts here: /usr/local/root/new/root/include /usr/local/include/g++ /usr/local/include /usr/local/i686-pc-linux-gnu/include /usr/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.91.66/include /usr/include End of search list. /usr/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.91.66/cc1plus /tmp/ccT962ck.ii -quiet -dumpbase ntp1.cc -O -Wall -version -fPIC -o /tmp/ccqV5IBF.s GNU C++ version egcs-2.91.66 19990314 (egcs-1.1.2 release) (i686-pc-linux-gnu) compiled by GNU C version egcs-2.91.66 19990314 (egcs-1.1.2 release). as -V -Qy -o ntp1.o /tmp/ccqV5IBF.s GNU assembler version 2.9.1 (i386-redhat-linux), using BFD version 2.9.1.0.24 g++ -v -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 Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.91.66/specs gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release) /usr/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.91.66/collect2 -m elf_i386 -export-dynamic -dynamic-linker /lib/ld-linux.so.2 -o ntp1 /usr/lib/crt1.o /usr/lib/crti.o /usr/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.91.66/crtbegin.o -L/usr/local/root/new/root/lib -L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.91.66 -L/usr/local/i686-pc-linux-gnu/lib -L/usr/local/lib ntp1.o -lCore -lCint -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -ldl -lpthread -lstdc++ -lm -lgcc -lc -lgcc /usr/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.91.66/crtend.o /usr/lib/crtn.o 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 Rene Brun wrote: > Could you tell me: > -which binary file you have taken from teh Root binary distribution? > -the result of g++ -v > -check your env variables PATH and LD_LIBRARY_PATH > > As I told you, this message appears when mixing code compiled > with egcs1.1 and gcc2.95 > > Rene Brun > > On Fri, 13 Sep 2002, therin wrote: > > > Hi, I mentionned a problem of compilation and the solution you gave me > > doesn't work. > > I got the same error message. > > > > Could yo give me your help again. > > > > > > Rene Brun wrote: > > > > > 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