QtGlobal not found when compiling B1 example: Geant4 v11.2

Dear All, I just installed gent4 version v11.2.1 and when compiling B1 example I have the following error: QtGlobal not found.

Thank you, rachid

_Geant4 Version: v11.2.1
Operating System: Ubuntu 20.04.6 LTS
Compiler/Version: gcc version 9.4.0
CMake Version: 3.16.3

Can someone answer me please …


Hi Rachid

Mmm. The obvious question: have you installed Qt?

And if you have, you might need to point cmake to the installation using CMAKE_PREFIX_PATH. For example, I have the following cmake options (but your Qt might be somewhere else):

-DCMAKE_PREFIX_PATH=$(brew --prefix qt@5)


$ echo $(brew --prefix qt@5)

Hope that helps.


In addition to @allison’s comment, it looks like you’re trying to build the example with the old “Geant4GNUmake” system. Did you source the geant4make.sh script before trying to build?

In either case, it’s strongly recommended to use the CMake build system unless you need to maintain an existing GNUmake system. See the Application Developer Guide for how to use this.