I am using the Geant4 toolkit with low energy EM package. I am making some changes to an already written code. First I was using the standard package and there was no compilation error, after changing the model I am getting the error ‘undefined reference to’.
What are your suggestions to resolve the error?
[ 9%] Linking CXX executable cyliSD
CMakeFiles/cyliSD.dir/src/ExN01PhysicsList.cc.o: In function ExN01PhysicsList::ConstructEM()': ExN01PhysicsList.cc:(.text+0x32a): undefined reference to
G4LowEnergyCompton::G4LowEnergyCompton(G4String const&)’
ExN01PhysicsList.cc:(.text+0x379): undefined reference to G4LowEnergyPhotoElectric::G4LowEnergyPhotoElectric(G4String const&)' ExN01PhysicsList.cc:(.text+0x3ae): undefined reference to
G4LowEnergyPhotoElectric::ActivateAuger(bool)’
ExN01PhysicsList.cc:(.text+0x3da): undefined reference to G4LowEnergyPhotoElectric::SetCutForLowEnSecPhotons(double)' ExN01PhysicsList.cc:(.text+0x406): undefined reference to
G4LowEnergyPhotoElectric::SetCutForLowEnSecElectrons(double)’
ExN01PhysicsList.cc:(.text+0x457): undefined reference to G4LowEnergyRayleigh::G4LowEnergyRayleigh(G4String const&)' ExN01PhysicsList.cc:(.text+0x520): undefined reference to
G4LowEnergyIonisation::G4LowEnergyIonisation(G4String const&)’
ExN01PhysicsList.cc:(.text+0x54f): undefined reference to G4LowEnergyIonisation::ActivateAuger(bool)' ExN01PhysicsList.cc:(.text+0x578): undefined reference to
G4LowEnergyIonisation::SetCutForLowEnSecPhotons(double)’
ExN01PhysicsList.cc:(.text+0x5a1): undefined reference to G4LowEnergyIonisation::SetCutForLowEnSecElectrons(double)' ExN01PhysicsList.cc:(.text+0x5f7): undefined reference to
G4LowEnergyBremsstrahlung::G4LowEnergyBremsstrahlung(G4String const&)’
ExN01PhysicsList.cc:(.text+0x920): undefined reference to G4hLowEnergyIonisation::G4hLowEnergyIonisation(G4String const&)' ExN01PhysicsList.cc:(.text+0xa64): undefined reference to
G4hLowEnergyIonisation::G4hLowEnergyIonisation(G4String const&)’
collect2: error: ld returned 1 exit status
CMakeFiles/cyliSD.dir/build.make:370: recipe for target ‘cyliSD’ failed
make[2]: *** [cyliSD] Error 1
CMakeFiles/Makefile2:99: recipe for target ‘CMakeFiles/cyliSD.dir/all’ failed
make[1]: *** [CMakeFiles/cyliSD.dir/all] Error 2
Makefile:129: recipe for target ‘all’ failed
make: *** [all] Error 2
Thanks in advance