Re: linking on DEC/OSF1

Pasha Murat (murat@cdfsga.fnal.gov)
Thu, 1 Oct 1998 12:09:03 -0500 (CDT)


Rene Brun writes:
> > > >
> > > > marie> g++ -o test_file -Wl,-soname -I/$ROOTSYS/include -L/$ROOTSYS/lib
> > > > -lNew -lBase -lFunc -lCint -lClib -lCont -lFunc -lHist -lHtml -lMatrix
> > > > -lMeta -lMinuit -lNet -lPostscript -lProof -lTree -lUnix -lZip -lGpad
> > > > -lGui -lGraf -lGraf3d -lGX11 -lX3d -lXm -lXpm test_root.C
> > > >
> > > > /bin/ld:
> > > > Unresolved:
> > > > TFile::TFile(char const *, char const *, char const *, int)
> > > > collect2: ld returned 1 exit status
> > > > make: *** [test_file] Error 1
> > > >
> > >
> > > This one is easy.
> > > You simply forgot the backslash in your link procedure. It must be:
> > > g++ -o test_file -I/$ROOTSYS/include -L/$ROOTSYS/lib \
> > > -lNew -lBase -lFunc -lCint -lClib -lCont -lFunc -lHist -lHtml -lMatrix \
> > > -lMeta -lMinuit -lNet -lPostscript -lProof -lTree -lUnix -lZip -lGpad \
> > > -lGui -lGraf -lGraf3d -lGX11 -lX3d -lXm -lXpm test_root.C
> > >
> > > Rene Brun
> > >
>
> Well, the only possibility left is that you did not defined
> the LD_LIBRARY_PATH = $ROOTSYS/lib
>
> Rene Brun

Another possibility is that ROOT libraries used have been compiled
with the native compiler and not with GCC. -pasha.