Dear All, I am encountering link errors whilst attempting to use the hadronic physics list (LHEP_PRECO_HP). The procedure I followed is described below (this procedure is identical to that I was using for geant4.7.0 for which I encountered no errors) : cd /usr/local/geant4.7.1/physics_lists/hadronic/Packaging gmake cd ../LHEP_PRECO_HP gmake this creates static libraries that reside in $G4LIB/plists/$G4SYSTEM Then I copied GNUmakefile.user.code.example to my directory and commented out the following lines to set the relevant link variables EXTRALIBS += -lLHEP_PRECO_HP EXTRALIBS += -lPackaging and in my main file I include the header, #include "LHEP_PRECO_HP.hh" and declare an instance of the appropriate class: LHEP_PRECO_HP* physics = new LHEP_PRECO_HP(); runManager->SetUserInitialization(physics); Then, when I attempt to make the application I encounter a number of errors; the first being: /usr/lib/gcc-lib/i586-suse-linux/3.3.5/../../../../i586-suse-linux/bin/ld: `.gnu.linkonce.t._ZNK23G4NeutronHPInterpolator11InterpolateE21G4InterpolationSchemeddddd' referenced in section `.rodata' of /usr/local/geant4.7.1/lib/Linux-g++/libG4had_neu_hp.a(G4NeutronHPVector.o): defined in discarded section `.gnu.linkonce.t._ZNK23G4NeutronHPInterpolator11InterpolateE21G4InterpolationSchemeddddd' of /usr/local/geant4.7.1/lib/Linux-g++/libG4had_neu_hp.a(G4NeutronHPVector.o) If, on the other hand, I attempt to use LHEP_BIC_HP I encounter the following linnk error: /home/iwan/geant4/tmp/Linux-g++/CutsBugTest/exe/CutsBugTest.o(.gnu.linkonce.t._ZN12TLHEP_BIC_HPI21G4VModularPhysicsListEC1Ev+0x254): In function `TLHEP_BIC_HP<G4VModularPhysicsList>::TLHEP_BIC_HP[in-charge]()': CutsBugTest.cc: undefined reference to `HadronPhysicsLHEP_BIC_HP::HadronPhysicsLHEP_BIC_HP[in-charge](G4String const&)' Note, I did not encounter these problems with geant4.7.0 using the environment: gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
You're NOT building the physics-lists package in the appropriate way. You need to issue 'make' from the directory: /usr/local/geant4.7.1/physics_lists/hadronic and NOT from: /usr/local/geant4.7.1/physics_lists/hadronic/Packaging The link error you get though, seems the same related to problem report #770, so it may be due to a system/compiler incompatibility.
Yes, what you have suggested works. In the past I have built these lists using the procedure described below (and outlined in the README file in the physics_lists/hadronic directory). Is it plausible to build these lists as part of the G4 installation process? For example, one could be prompted during the Configure script if they would like electromagnetic or hadronic lists to be built. The link error was related to system/compiler compatibility, I am still working on this. Regards, Iwan