Message: Re: Link error while using ROOT Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Link error while using ROOT 

Forum: Installation and Configuration
Re: Question Link error while using ROOT (Dao He)
Re: News Re: Link error while using ROOT (Ben Morgan)
Date: 04 Mar, 2012
From: Dao He <Dao He>

On Fri, 02 Mar 2012 13:17:10 GMT, Ben Morgan wrote:
> Hi Dao,
> 
> On Fri, 02 Mar 2012 03:12:10 GMT, Dao He wrote:
> > I installed geant4.9.4.p03 in my Scientific Linux SL release 5.3 system.
> > 
> > When I run the example N01, there is no problem.
> > 
> > However, after I add the following two sentence to the makefile of N01
> > for ROOT:
> > 
> > ---------------------------------------------------------------------------
> > 
> > LDFLAGS += `root-config --nonew --libs`
> > 
> > CPPFLAGS += `root-config --cflags
> > 
> > ---------------------------------------------------------------------------
> > 
> > I received the message:
> > 
> > ---------------------------------------------------------------------------
> > 
> > Using global libraries ...
> > 
> > Linking exampleN01
> > 
> > /usr/bin/ld: cannot find -lG4Tree
> > 
> > collect2: ld returned 1 exit status
> > 
> > make: *** [/home/hedao/g4work/bin/Linux-g++/exampleN01] Error 1
> 
> If you're building exampleN01 o.k. without the LDFLAGS and CPPFLAGS
> lines, then I don't thinks there's any problem with your Geant4 setup.
> Additional libraries can be added to a Geant4 Makefile, but via the
> EXTRALIBS variable (see the Section 6.3 of the Application Developer's
> Guide Appendix (http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/ForApplicationDeveloper/html/apas06.html#sect.MkflEnvVar.LnkExtLib)
> ), so I would try changing those lines to:
> 
> CPPFLAGS += `root-config --cflags`
> EXTRALIBS += `root-config --nonew --libs`
> 
> Cheers,
> 
> Ben.

Thanks! I tried the makefile using "EXTRAFLAGS" and got the following error messages and now I am trying to reintall the ROOT...

----------------------------------------------------------------------------

Using global libraries ... Linking exampleN01 /cern/root/lib/libCore.so: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)@GLIBCXX_3.4.9'

(many same format messages ommited.)

----------------------------------------------------------------------------

 Add Message Add Message
to: "Re: Link error while using ROOT"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]