Hi, I am a complete Geant4 beginner. I recently installed the software on my Windows machine using the Ubuntu App. 20.04.4 LTS. The installation has been successful, however, I haven’t succeeded to run a basic example yet to test my installation.
The issue seems to be related to introducing source file paths correctly. After I sourced geeant4.sh (which seems to be located in two locations, but I picked the one suggested in the Geant4 installation guide) Then I configured the example B1. The installation prefix is already added to CMAKE_PREFIX_PATH. Hence, I tried setting Geant4_DIR to the directory containing Geant4Config.cmake after it complained. ’
CMakeLists.txt in the geant4-11.1 directory in my case but I am not sure how to point out its location for Geant4. I would highly appreciate it if you share any troubleshooting tips you may have.
$ cmake -S /opt/software/geant4/geant4-11.0.1/examples/basic/B1 -B B1_build -DCMAKE_PREFIX_PATH=/opt/software/geant4-11.0.1-install
First make a copy of the B1 so that it does not get messed up under experimentation. You can try:
$ cp -R /opt/software/geant4/geant4-11.0.1/examples/basic/B1 .
$ cd B1
$ mkdir build
$ cd build
$ comp ..
$ ./exampleB1 exampleB1.in
Thanks, however I am still having the same error.
Thank you. I tried your suggestion, Now I am getting the following messages at the end.
I believe I was able to run the example, but not sure if everything works out as it is supposed to.
Yep, that’s the expected output, so all looks good.
As a secondary question, I selected DGEANT4_USE_QT=ON during installation. What is the additional step I need to do to visualize the example using Qt?
Sorry for the delayed response! For QT visualization you can just use:
It should launch the GUI.