Qt Install Windows vs 2019

I have been trying to install Geant4 with Qt, I have managed to set Qt as its user interface but when I try to reinstall Geant4 to make it set up for Qt I receive this long error message: LNK2019 unresolved external symbol

Geant4 seems to be compiled correctly as I am able to run example B1 but I am unable to see it visualized with Qt.

I am new to Geant4 so any help would be great,
Thank you!

If you installed Qt from their installers, then I’d suspect this is the same issue as reported here:

The first thing to check is the values for the Qt5... CMake cache values as shown in

and that the “platform” part (the directory after C:/Qt/<version>/) is correct for your system. In general, this should be vs2019_64 for standard installs.

Thank you for your help. I have found that I only have the mingw81_64 Qt installed. Is this version not compatible with visual studios? I have tried to install the vs2019_64 version, but cannot seem to find it.

Hi Alaina,

Try removing your current installation of QT. Go to: Download Qt: Get Qt Online Installer

And download the qt windows binary installer. During the installation I believe it will ask you what QT packages you want to install. Find the latest QT installation for visual studio. Look for MSVC 2019.

Put the QT bin and lib folders in your “PATH” found in your windows environment variables.

Reinstall Geant4 with the QT option turned on. Geant should be able to automatically locate the required executables.

If you encounter any trouble feel free to reach out directly.

Happy coding!

Charles