Geant4 Version: 11.2.2
Operating System: Ubuntu 24.04.1 LTS
Compiler/Version: gcc and g++
CMake Version: 3.28.3
I’m new to geant4, cmake, linux, and pretty much everything involved in this so forgive me if this is a simple fix. I’m trying to make example B4a but I keep getting the error shown below. The only reason I’ve found for it online has been that my G4VisExecutive.icc is corrupted. However, I’ve managed to run example B1 without any issues, so what would be causing this?
{
Making dependency for file exampleB4a.cc ...
In file included from /home/user/software/geant4/geant4-v11.2.2/source/visualization/management/include/G4VisExecutive.hh:141,
from exampleB4a.cc:38:
/home/user/software/geant4/geant4-v11.2.2/source/visualization/management/include/G4VisExecutive.icc:142:10: fatal error: QtGlobal: No such file or directory
142 | #include <QtGlobal>
| ^~~~~~~~~~
compilation terminated.
Making dependency for file src/SteppingAction.cc ...
Making dependency for file src/RunAction.cc ...
Making dependency for file src/PrimaryGeneratorAction.cc ...
Making dependency for file src/EventAction.cc ...
Making dependency for file src/DetectorConstruction.cc ...
Making dependency for file src/ActionInitialization.cc ...
Making dependency for file exampleB4a.cc ...
In file included from /home/user/software/geant4/geant4-v11.2.2/source/visualization/management/include/G4VisExecutive.hh:141,
from exampleB4a.cc:38:
/home/user/software/geant4/geant4-v11.2.2/source/visualization/management/include/G4VisExecutive.icc:142:10: fatal error: QtGlobal: No such file or directory
142 | #include <QtGlobal>
| ^~~~~~~~~~
compilation terminated.
Compiling ActionInitialization.cc ...
Compiling DetectorConstruction.cc ...
Compiling EventAction.cc ...
Compiling PrimaryGeneratorAction.cc ...
Compiling RunAction.cc ...
Compiling SteppingAction.cc ...
Creating shared library /home/summer/geant4_workdir/tmp/Linux-g++/exampleB4a/libexampleB4a.so ...
Compiling exampleB4a.cc ...
In file included from /home/user/software/geant4/geant4-v11.2.2/source/visualization/management/include/G4VisExecutive.hh:141,
from exampleB4a.cc:38:
/home/user/software/geant4/geant4-v11.2.2/source/visualization/management/include/G4VisExecutive.icc:142:10: fatal error: QtGlobal: No such file or directory
142 | #include <QtGlobal>
| ^~~~~~~~~~
compilation terminated.
make: *** [/home/user/software/geant4/geant4-v11.2.2/config/binmake.gmk:446: /home/user/geant4_workdir/tmp/Linux-g++/exampleB4a/exe/exampleB4a.o] Error 1
}