Hi All. I’m attempting to build geant4-v11.3.0 with GDML following previous questions Geant4 installation options on Windows.
I follow the methodology suggested by weller. However, Xerces-C still cannot be found.
CMake Error at C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
Failed to find XercesC (missing: XercesC_LIBRARY XercesC_INCLUDE_DIR
XercesC_VERSION) (Required is at least version "3.3.0")
I can see that the GDML headers have been built and the CmakeCache shows the following messages relating to the inclusion of XercesC.
//No help, variable specified on the command line.
CMAKE_PREFIX_PATH:UNINITIALIZED=C:\Program Files\xercesc\xerces-c-3.3.0-install
...
//Xerces-C++ include directory
XercesC_INCLUDE_DIR:PATH=C:/Program Files/xercesc/xerces-c-3.3.0-install/include
//Xerces-C++ libraries (debug)
XercesC_LIBRARY_DEBUG:FILEPATH=XercesC_LIBRARY_DEBUG-NOTFOUND
//Xerces-C++ libraries (release)
XercesC_LIBRARY_RELEASE:FILEPATH=C:/Program Files/xercesc/xerces-c-3.3.0-install/lib/xerces-c_3.lib
I have previously built Geant4 and had this working without GDML, but have then attempted to rebuild this with GDML and get this issue. I can recover Geant4 without GDML. How can I correctly build the GDML tools?
See details of my build below.
Thanks in advance,
Joe Crone
XercesC has been installed at C:\Program Files\xercesc\xerces-c-3.3.0-install following the instructions Build Instructions and configured for the windows build, with
cmake -DCMAKE_INSTALL_PREFIX="C:\Program Files\xercesc\xerces-c-3.3.0-install" "C:\Program Files\xercesc\xerces-c-3.3.0"
cmake --build . --config Debug
cmake --build . --config Debug --target install
Then in the Geant4 build I have used the standard build as described in https:;;geant4-userdoc.web.cern.ch;UsersGuides;InstallationGuide;html;installguide.html#on-windows-platforms.
(Apologies, using semi-colons instead of slashes in links because of forum limits for new users)
However, I have used the configuration
cmake <standard> -DCMAKE_PREFIX_PATH="C:\Program Files\xercesc\xerces-c-3.3.0-install" -DGEANT4_USE_GDML=ON "C:\Program Files\Geant4\geant4-v11.3.0"
cmake --build . --config Release
cmake --build . --config Release --target install
_Geant4 Version:v11.3.0
_Operating System:Windows 11
_Compiler/Version:MSVC 14.42
_CMake Version:3.30.5-msvc23