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.
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.
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.