Adding Visualisation Options Post Install

I’m new to using Geant4 and C++ in general so sorry if this question seems trivial. I’ve run cmake and built and installed Geant4. However, I did not turn on any visualisation options while I was building Geant4. Is there a way to include these without uninstalling Geant4 and going through the build and installation process all over again? Thanks in advance.

You shouldn’t need to uninstall and start from scratch.

From your build directory re-run cmake with the additional option(s) flags, note the trailing dot . signifying the current directory.

cmake -DADDITIONAL_OPTION=ON .

run your build command to build the new functionality and then install to put it in the right place.

Getting this error

C:\Users\Stephen\Geant4\geant4_10_06-build>cmake -DGEANT4_USE_QT=ON .
CMake Error at C:/Program Files/CMake/share/cmake-3.17/Modules/FindQt4.cmake:1314 (message):
Found unsuitable Qt version “” from NOTFOUND, this code requires Qt 4.x
Call Stack (most recent call first):
cmake/Modules/Geant4InterfaceOptions.cmake:117 (find_package)
cmake/Modules/G4CMakeMain.cmake:64 (include)
CMakeLists.txt:50 (include)

– Configuring incomplete, errors occurred!
See also “C:/Users/Stephen/Geant4/geant4_10_06-build/CMakeFiles/CMakeOutput.log”.
See also “C:/Users/Stephen/Geant4/geant4_10_06-build/CMakeFiles/CMakeError.log”.

I think it might be because I haven’t downloaded Qt? But I keep reading that Qt is included by default in the documentation.

I almost positive Qt is not provided with geant4 and you need to download and install it separately.

1 Like

Yeah it isn’t, sorry I misread that in the documentation. Thanks for the help