Solution: Problems with GEANT4 older versions installation

Just a solution to this thread:
https://geant4-forum.web.cern.ch/t/problems-with-geant4-older-versions-installation/
I had the same problem on g++>12 and found two solutions on how to solve it. Either just install g++<=12 (I don’t think the compiler version was actually 11) or add #include <cstdint> in geant4-v11.0.4/source/externals/clhep/include/CLHEP/Random/RandomEngine.h:

sed -i '/^namespace CLHEP {/i #include <cstdint>' geant4-v11.0.4/source/externals/clhep/include/CLHEP/Random/RandomEngine.h
1 Like