Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!
_Geant4 Version:_geant4-v11.3.2
_Operating System:_Ubuntu 24.04
_Compiler/Version:_gcc 13.3.0 CMake Version:
Sir,
I have followed the installation guide to get :abhijit@abhijit:~/Documents/geant4-v11.3.2-build$ cmake -DCMAKE_INSTALL_PREFIX=/path/to/geant4-v11.3.0-install /path/to/geant4-v11.3.0. But running this code is giving error messages with /path/to replaced accordingly.I am not understanding what to write for the path of the install directory and source directory in place of “/path/to” - specially the 2nd “/path/to” which is the path of the source directory. Geant4 is saved in the Documents directory. Do I have to install CMake first?I have not done that yet.
With Regards,
Abhijit
Yes, you have to install CMake first otherwise the cmake command will not be available. It’s worth checking if it is installed already by running which cmake and see if it prints something like “cmake not found”. If that’s the case you’ll need to install it through apt or similar.
For the /path/to replacements, if you’ve followed the steps in the Installation Guide, then /path/to would be ~/Documents, so there would be directories:
~/Documents/geant4-v11.3.2 (where the Geant4 source code is)
~/Documents/geant4-v11.3.2-build (where the build will be done)
~/Documents/geant4-v11.3.2-install (where the headers, libraries etc will go)
At the moment it sounds like you only have the ~/Documents/geant4-v11.3.2 directory, and that holds the Geant4 source code? If that’s the case then /path/to is ~/Documents in your case.