Re: linking on DEC/OSF1
Rene Brun (Rene.Brun@cern.ch)
Thu, 01 Oct 1998 14:32:10 +0200
Mark Boulay wrote:
>
> =================================================================
> = =
> = Mark Boulay =
> = Department of Physics phone/voice mail: (613) 545-6861 =
> = Queen's University fax: (613) 545-6813 =
> = Kingston, Ontario email: mgb@sno.phy.queensu.ca =
> = Canada, K7L 3N6 =
> = =
> =================================================================
> Root team, Rene,
>
> The g++ line below was the line executed at the shell prompt; the
> makefile did contain the backslashes. I'm a little puzzled as to
> why this doesn't work; the compiler options are the same as those
> in the $ROOTSYS/test directory.
>
> Mark.
>
> On Thu, 1 Oct 1998, Rene Brun wrote:
>
> > Mark Boulay wrote:
> > >
> > > Root team,
> > >
> > > I'm trying to compile and link a simple test program
> > > on DEC/OSF1 with root 2_00/11. The following is the test file, along
> > > with the compiler output. I get similar unresolved messages when
> > > trying to build the examples in the $ROOTSYS/test directory.
> > >
> > > #############################file test_root.C###################
> > > #include "TROOT.h"
> > > #include "TFile.h"
> > > void main()
> > > {
> > > TROOT theRoot("theRoot","Test");
> > > TFile *f1 = new TFile("f1","RECREATE","test file");
> > > f1->Close();
> > > }
> > > ################################################################
> > >
> > > 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