G4GDMLRead.hh does not see XercesC

_Geant4 Version: 10.4.3
_Operating System: macOS Sonoma 14.5
_Compiler/Version: Apple clang 15.0
_CMake Version: 3.25.1

I’m trying to enable the gdml reader in Geant4 v10.4.3.
I’ve installed the Xerces-C version 3.2.5 through homebrew, and I give the CMake command in the build directory of geant4 specifying the path where to find Xerces as:


However, when coding my detectorconstruction including the “G4GDMLParser.hh”, the code editor (I’m using visual studio) tells me that in G4GDMLRead.hh all the include to the xercesc headers are not finding the path.

Opening also the CMakeCache.txt in the build directory this is what I find:

//Path to a file.

//Path to a library.

//No help, variable specified on the command line.

How can I solve it?

Could you post the error message here please, and also the full compile command that causes the error (run make VERBOSE=1).

Bear in mind that 10.4.3 is extremely old and we can’t guarantee functionality on the latest systems. Unless you have a very good reason to pick 10.4.3, I’d strongly suggest using the latest 11.2 version.

Sorry for the late reply.
In the end the problem seemed to be only in the workspace of visual studio, while compiling and linking everything it seems to work fine.