So I wanted to open the visualization by using QT. I installed QT and in this topic Define a meniscus solid@evc said me to compile again Geant4 with the QT path
I don’t know if it could depend on some warning (or erro that I see during the Geant4 building after I do the commands cmake --build . --config Release
and cmake --build . --config Release --target install
)
a. Delete the CmakeCache
b. Use the command cmake -DCMAKE_INSTALL_PREFIX="C:\Program Files\geant4_10_06-install" "C:\Program Files\geant4_10_06" -DGEANT4_USE_QT=ON -DCMAKE_PREFIX_PATH="C:\Qt\5.15.0\winrt_x64_msvc2019"
The cmake invocation looks fine, so all I can spot is that the winrt/mingw builds of Qt don’t match the use of MSVC. IIRC, Qt should provide C:\Qt\5.15.0\msvc2019_64 that would be compatible, so try reconfiguring/rebuilding with that in the CMAKE_PREFIX_PATH.
Depending on which Qt installer you used, it should have given you the opportunity to install msvc2019 and msvc2019_64 libraries. I think those will be required to use Qt with Geant4 on this machine.
Hello @bmorgan, I installed those Qt packages. I installed again Geant but when I runned an applicatio I got these errors:
I got these errors both if I run using visualization and not using it.
Then I downloaded the missing dll and I copied them in C:/system32 directory
but now I get this error
and I get it if I run with and without visualization
Do you know what should I do?
Ps. @bmorgan
Notice that I also tried to run the original B1 example, but I get that error
The failure to locate a DLL error is usually a symptom of the directory holding them noting being in the PATH environment variable. You should update that (just as you did to point to the Geant4 DLLs) to point to the directory holding the appropriate Qt5 DLLs. As you’re building for msvc2019_x64, first find the directory under C:\Qt\5.15.0\msvc2019_x64 which has Qt5Core.dll and then add that directory to the PATH.
At the same time, double check that all the data library environment variables are set as well as when running with Qt the error message on these not being set might induce the “0xc000007b” error.
I solved this b downloading the dll and putting them in c:/windows/system32 but when I did it I got the “0xc000007b” error.
do you mean the environment variables for G4ABLA, g4ndl etc?
They are setted…indeed when I installed again without qt, geant4 worked fine.
Now I’m trying to install it again by using qt, but it I still get the 0xc000007b error
Download from where? From C:\Qt\5.15.0\msvc2019_x64? It’s likely that you’ve built a 64bit application but have the 32bit DLLs. You should delete the Qt DLLs in c:/windows/system32 and add where the DLLs are under C:\Qt\5.15.0\msvc2019_x64 to PATH, like for the Geant4 DLLs.
Hi
I have the same posted probleme here (no interactive display of the geomitry just an image), @bmorgan please what do you mean by “… delete the Qt DLLs in c:/windows/system32…”, delete this path in the environment variable or delete the Qt DLLs located in this folder “system32” whish i don’t find them?
Regards
Lazhar!
Hi @Zazo when I tried to install QT the first time I didn’t set the path!
Install Geant in this way cmake -DCMAKE_INSTALL_PREFIX="C:\Program Files\geant4_10_07-install" "C:\Program Files\geant4_10_07" DCMAKE_PREFIX_PATH="C:\Qt\5.15.0\msvc2019_x64" -DGEANT4_USE_QT=ON
The directory where tou have QT for your system (in my case it’s a x64)
At the end of the installation, you have to set the enviroment variables…ie. you have to set the path where the DLLs (Qt5Widgets.dll, Qt5OpenGl, ecc) are under C:\Qt\5.15.0\msvc2019_x64 to PATH, like for the Geant4 DLLs (in my case C:\Qt\5.15.2\msvc2019_64\bin)
I guess that in the command of geant4 installation could add -DGEANT4_USE_OPENGL_WIN32=ON, because in the book for application developers wrotten: The Qt driver requires the OpenGL library… So I add it , after the execution of EampleB1 I got an image not an interactive display (Qt doesn’t work!)
Hello, I’m not an expert, I just followed the help of @bmorgan
When I installed G4 using QT I didn’t write
-DGEANT4_USE_OPENGL_WIN32=ON,
it worked writing the command in my previous message…try to install g4 againg without that command. Otherwise, I’m sorry, but you have to wait for @bmorgan because I really don’t know the reason of that error