Problem 521

Summary: ld cannot find -lCLHEP on compiling (in final linking stage)
Product: Examples/Basic and Novice Reporter: jlidgard
Component: N01Assignee: Gabriele Cosmo <Gabriele.Cosmo>
Status: CLOSED INVALID    
Severity: normal CC: htktrang
Priority: P2    
Version: other   
Hardware: PC   
OS: Linux   

Description jlidgard 2003-08-07 11:14:30 CEST
Hi,
Ive installed CLHEP a few different times and Geant4 with a few different
options selected in configure and also tried setting the LD_LIBRARY_PATH
but i still get the following error

__________________________
$ gmake
Making dependency for file exampleN01.cc...
Making dependency for file src/ExN01PrimaryGeneratorAction.cc ...
Making dependency for file src/ExN01PhysicsList.cc ...
Making dependency for file src/ExN01DetectorConstruction.cc ...
Compiling ExN01DetectorConstruction.cc ...
Compiling ExN01PhysicsList.cc ...
Compiling ExN01PrimaryGeneratorAction.cc ...
Creating/replacing object files in
/home/Jeff/Geant4/work/tmp/Linux-g++/exampleN01/libexampleN01.a
Compiling exampleN01.cc ...
Using granular libraries ...
Linking exampleN01 ...
/usr/bin/ld: cannot find -lCLHEP
collect2: ld returned 1 exit status
gmake: *** [/home/Jeff/Geant4/work/bin/Linux-g++/exampleN01] Error 1
Comment 1 jlidgard 2003-08-12 17:42:59 CEST
when i installed the new CLHEP library, the library was named libCLHEP-g++.1.8.0.0.a
geant4 was looking for libCLHEP.a
fixed with a symbolic link
Comment 2 htktrang 2004-04-28 05:09:59 CEST
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../../i686-pc-cygwin/bin/ld: cannot
find -llibCLHEP.a
collect2: ld returned 1 exit status
make: *** [c:/geant4/geant4work/bin/WIN32-g++/exampleN01] Error 1
---------------
In my pc the ld.exe file locates at /usr/i686-pc-cygwin/bin. There is no
dir/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../../i686-pc-cygwin/bin/
Comment 3 Gabriele Cosmo 2004-04-28 05:18:59 CEST
htktrang@popx.tokai.jaeri.go.jp wrote:
> /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../../i686-pc-cygwin/bin/ld:
> cannot find -llibCLHEP.a

Please, read our FAQ !
This report was related to Linux systems.
You're talking about Windows...
On Windows the CLHEP library file must be named CLHEP.lib.