Problem 621

Summary: can not link CLHEP.lib
Product: Examples/Basic and Novice Reporter: htktrang
Component: N01Assignee: Makoto.Asai
Status: RESOLVED INVALID    
Severity: normal    
Priority: P2    
Version: 6.0   
Hardware: Other   
OS: Windows   

Description htktrang 2004-05-06 04:54:26 CEST
My PC is Windows XP, compiler is g++.
I source the following setup.sh file before make N01
--------------------
# Set G4SYSTEM
export G4SYSTEM=WIN32-g++
#
# Turn on debug flags, note that testing was done for the debug version only.
export G4DEBUG=1
#
# Set Path to CLHEP
export CLHEP_BASE_DIR=/c/CLHEP
export CLHEP_INCLUDE_DIR=$CLHEP_BASE_DIR/include
export CLHEP_LIB_DIR=$CLHEP_BASE_DIR/lib
export CLHEP_LIB=CLHEP.lib

export G4LIB_BUILD_STATIC=1
export G4INSTALL=/c/geant4/geant4_6_0

# Set G4WORKDIR env. var.
export G4WORKDIR=/c/geant4/geant4work
---------------------------

I still face the following error:

----------------------------------
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../../i686-pc-cygwin/bin/ld: cannot
find -lCLHEP.lib
collect2: ld returned 1 exit status
make: *** [/c/geant4/geant4work/bin/WIN32-g++/exampleN01] Error 1
-----------------------------

Please show me what I should do to overcome this point.
Comment 1 Gabriele Cosmo 2004-05-06 08:03:59 CEST
The following in your setup is wrong:
  export CLHEP_LIB=CLHEP.lib
It should eventually be:
  export CLHEP_LIB=CLHEP
and your library file called CLHEP.lib.
Please, check.
Please, also see our FAQ page.
Comment 2 Gabriele Cosmo 2004-05-06 08:07:59 CEST
Note: since you're using g++ as compiler on Windows, it may be the case
your CLHEP library file should be called libCLHEP.a instead.