Dear all,
I have installed geant4.10.04.p01 in ubuntu 20.04. everything was ok when compiling and run some examples using CMake-3.5.0-rc3 but when ChargeExchangeMC advanced example there were problems when approaching the end of compiling after approaching 100% as follow:
[100%] Linking CXX executable ChargeExchangeMC
/usr/bin/ld: CMakeFiles/ChargeExchangeMC.dir/src/CexmcSetup.cc.o: in function CexmcSetup::SetupSpecialVolumes(G4GDMLParser const&)': CexmcSetup.cc:(.text+0x70c): undefined reference to
G4GDMLReadStructure::GetVolumeAuxiliaryInformation(G4LogicalVolume*) const’
/usr/bin/ld: CMakeFiles/ChargeExchangeMC.dir/src/CexmcSetup.cc.o: in function CexmcSetup::ReadTransforms(G4GDMLParser const&)': CexmcSetup.cc:(.text+0x1491): undefined reference to
G4GDMLReadDefine::GetPosition(G4String const&)’
/usr/bin/ld: CexmcSetup.cc:(.text+0x14ed): undefined reference to G4GDMLReadDefine::GetRotation(G4String const&)' /usr/bin/ld: CexmcSetup.cc:(.text+0x1629): undefined reference to
G4GDMLReadDefine::GetPosition(G4String const&)’
/usr/bin/ld: CexmcSetup.cc:(.text+0x16c1): undefined reference to G4GDMLReadDefine::GetRotation(G4String const&)' /usr/bin/ld: CexmcSetup.cc:(.text+0x180b): undefined reference to
G4GDMLReadDefine::GetPosition(G4String const&)’
/usr/bin/ld: CexmcSetup.cc:(.text+0x18a7): undefined reference to G4GDMLReadDefine::GetRotation(G4String const&)' /usr/bin/ld: CMakeFiles/ChargeExchangeMC.dir/src/CexmcSetup.cc.o: in function
CexmcSetup::Construct()’:
CexmcSetup.cc:(.text+0x1a5a): undefined reference to G4GDMLParser::G4GDMLParser()' /usr/bin/ld: CexmcSetup.cc:(.text+0x1a74): undefined reference to
G4GDMLRead::Read(G4String const&, bool, bool, bool)’
/usr/bin/ld: CexmcSetup.cc:(.text+0x1a7c): undefined reference to G4GDMLParser::ImportRegions()' /usr/bin/ld: CexmcSetup.cc:(.text+0x1aba): undefined reference to
G4GDMLReadStructure::GetWorldVolume(G4String const&)’
/usr/bin/ld: CexmcSetup.cc:(.text+0x1b44): undefined reference to G4GDMLParser::~G4GDMLParser()' /usr/bin/ld: CMakeFiles/ChargeExchangeMC.dir/src/CexmcSetup.cc.o: in function
xercesc_3_2::HandlerBase::fatalError(xercesc_3_2::SAXParseException const&)’:
CexmcSetup.cc:(.text.unlikely._ZN11xercesc_3_211HandlerBase10fatalErrorERKNS_17SAXParseExceptionE[_ZN11xercesc_3_211HandlerBase10fatalErrorERKNS_17SAXParseExceptionE]+0x1f): undefined reference to xercesc_3_2::SAXParseException::SAXParseException(xercesc_3_2::SAXParseException const&)' /usr/bin/ld: CexmcSetup.cc:(.text.unlikely._ZN11xercesc_3_211HandlerBase10fatalErrorERKNS_17SAXParseExceptionE[_ZN11xercesc_3_211HandlerBase10fatalErrorERKNS_17SAXParseExceptionE]+0x26): undefined reference to
xercesc_3_2::SAXParseException::~SAXParseException()’
/usr/bin/ld: CexmcSetup.cc:(.text.unlikely._ZN11xercesc_3_211HandlerBase10fatalErrorERKNS_17SAXParseExceptionE[_ZN11xercesc_3_211HandlerBase10fatalErrorERKNS_17SAXParseExceptionE]+0x2d): undefined reference to typeinfo for xercesc_3_2::SAXParseException' /usr/bin/ld: CMakeFiles/ChargeExchangeMC.dir/src/CexmcSetup.cc.o: in function
xercesc_3_2::DTDEntityDecl::~DTDEntityDecl()’:
CexmcSetup.cc:(.text._ZN11xercesc_3_213DTDEntityDeclD2Ev[_ZN11xercesc_3_213DTDEntityDeclD5Ev]+0x13): undefined reference to xercesc_3_2::XMLEntityDecl::~XMLEntityDecl()' /usr/bin/ld: CMakeFiles/ChargeExchangeMC.dir/src/CexmcSetup.cc.o: in function
xercesc_3_2::DTDEntityDecl::~DTDEntityDecl()’:
CexmcSetup.cc:(.text._ZN11xercesc_3_213DTDEntityDeclD0Ev[_ZN11xercesc_3_213DTDEntityDeclD5Ev]+0x17): undefined reference to xercesc_3_2::XMLEntityDecl::~XMLEntityDecl()' /usr/bin/ld: CexmcSetup.cc:(.text._ZN11xercesc_3_213DTDEntityDeclD0Ev[_ZN11xercesc_3_213DTDEntityDeclD5Ev]+0x20): undefined reference to
xercesc_3_2::XMemory::operator delete(void*)’
/usr/bin/ld: CMakeFiles/ChargeExchangeMC.dir/src/CexmcSetup.cc.o: in function non-virtual thunk to xercesc_3_2::HandlerBase::fatalError(xercesc_3_2::SAXParseException const&)': CexmcSetup.cc:(.text.unlikely._ZThn24_N11xercesc_3_211HandlerBase10fatalErrorERKNS_17SAXParseExceptionE[_ZN11xercesc_3_211HandlerBase10fatalErrorERKNS_17SAXParseExceptionE]+0x1f): undefined reference to
xercesc_3_2::SAXParseException::SAXParseException(xercesc_3_2::SAXParseException const&)’
/usr/bin/ld: CexmcSetup.cc:(.text.unlikely._ZThn24_N11xercesc_3_211HandlerBase10fatalErrorERKNS_17SAXParseExceptionE[_ZN11xercesc_3_211HandlerBase10fatalErrorERKNS_17SAXParseExceptionE]+0x26): undefined reference to xercesc_3_2::SAXParseException::~SAXParseException()' /usr/bin/ld: CexmcSetup.cc:(.text.unlikely._ZThn24_N11xercesc_3_211HandlerBase10fatalErrorERKNS_17SAXParseExceptionE[_ZN11xercesc_3_211HandlerBase10fatalErrorERKNS_17SAXParseExceptionE]+0x2d): undefined reference to
typeinfo for xercesc_3_2::SAXParseException’
/usr/bin/ld: CMakeFiles/ChargeExchangeMC.dir/src/CexmcSetup.cc.o: in function CexmcSetup::Construct() [clone .cold]': CexmcSetup.cc:(.text.unlikely+0x441): undefined reference to
G4GDMLParser::~G4GDMLParser()’
/usr/bin/ld: CMakeFiles/ChargeExchangeMC.dir/src/CexmcSetup.cc.o:(.data.rel.ro._ZTIN11xercesc_3_213DTDEntityDeclE[_ZTIN11xercesc_3_213DTDEntityDeclE]+0x10): undefined reference to typeinfo for xercesc_3_2::XMLEntityDecl' /usr/bin/ld: CMakeFiles/ChargeExchangeMC.dir/src/CexmcSetup.cc.o:(.data.rel.ro._ZTVN11xercesc_3_213XMLAttDefListE[_ZTVN11xercesc_3_213XMLAttDefListE]+0x20): undefined reference to
xercesc_3_2::XMLAttDefList::isSerializable() const’
/usr/bin/ld: CMakeFiles/ChargeExchangeMC.dir/src/CexmcSetup.cc.o:(.data.rel.ro._ZTVN11xercesc_3_213XMLAttDefListE[_ZTVN11xercesc_3_213XMLAttDefListE]+0x28): undefined reference to xercesc_3_2::XMLAttDefList::serialize(xercesc_3_2::XSerializeEngine&)' /usr/bin/ld: CMakeFiles/ChargeExchangeMC.dir/src/CexmcSetup.cc.o:(.data.rel.ro._ZTVN11xercesc_3_213XMLAttDefListE[_ZTVN11xercesc_3_213XMLAttDefListE]+0x30): undefined reference to
xercesc_3_2::XMLAttDefList::getProtoType() const’
/usr/bin/ld: CMakeFiles/ChargeExchangeMC.dir/src/CexmcSetup.cc.o:(.data.rel.ro._ZTVN11xercesc_3_213DTDEntityDeclE[_ZTVN11xercesc_3_213DTDEntityDeclE]+0x20): undefined reference to xercesc_3_2::DTDEntityDecl::isSerializable() const' /usr/bin/ld: CMakeFiles/ChargeExchangeMC.dir/src/CexmcSetup.cc.o:(.data.rel.ro._ZTVN11xercesc_3_213DTDEntityDeclE[_ZTVN11xercesc_3_213DTDEntityDeclE]+0x28): undefined reference to
xercesc_3_2::DTDEntityDecl::serialize(xercesc_3_2::XSerializeEngine&)’
/usr/bin/ld: CMakeFiles/ChargeExchangeMC.dir/src/CexmcSetup.cc.o:(.data.rel.ro._ZTVN11xercesc_3_213DTDEntityDeclE[_ZTVN11xercesc_3_213DTDEntityDeclE]+0x30): undefined reference to `xercesc_3_2::DTDEntityDecl::getProtoType() const’
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/ChargeExchangeMC.dir/build.make:1077: ChargeExchangeMC] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/ChargeExchangeMC.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
Can you help me to fix these problems?