Re: [ROOT] variable ... in TTree's, linking problem on Linux

From: Otto Schaile (Otto.Schaile@Physik.uni-muenchen.de)
Date: Tue Jun 20 2000 - 16:26:58 MEST


Feng Shengqin wrote:
> 
> Hello Rene,
> 
> I am a new user of root, I use the root_v2.20.Linux.2.0.33.egcs.tar
> version,
> 
> The makefile is as follow:
> ^^^^^^^^^^^^^^^^^^^^^^^^
> #########################################################################
> # For Redhat linux:
> 
> ObjSuf        = o
> ...
...

> but when i type make -f m_linux then show:
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> g++ -g HBTProj.o -L/ROOT/root/lib -lNew -lBase -lCint -lClib -lCont -lFunc
> -lGraf -lGraf3d -lHist -lHtml -lMatrix -lMeta -lMinuit -lNet -lPostscript
> -lProof -lTree -lUnix -lZip -lGpad -lGui -lGX11 -lX3d -L/usr/X11R6/lib
> -lXpm -lX11 -lg++ -lm -ldl -rdynamic -o HBTProj
> /usr/bin/ld: cannot open -lg++: No such file or directory
> collect2: ld returned 1 exit status
> gmake: *** [HBTProj] Error 1


Shengqin,
 
you dont need libg++.so (anymore)

anyway instead of doing things yourself like:

LIBS          = $(ROOTLIBS) -lm -lg++ -ldl -rdynamic

you better use the scripts provided in $ROOTSYS/bin

ROOTCFLAGS    = $(shell root-config --cflags)
ROOTLIBS      = $(shell root-config --libs)
ROOTGLIBS     = $(shell root-config --glibs)

this makes your Makefile more robust against version changes of
root/linux,

cheers
Otto

-- 
Dr. Otto Schaile            Sektion Physik, LMU Muenchen
Phone: +49 89 289 14070     Am Coulombwall 1, D-85748 Garching, Germany
GSM:   +49 171 4312031
FAX:   +49 89 289 14072     EMail: Otto.Schaile@Physik.Uni-Muenchen.DE



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:28 MET