Created attachment 601 [details] Screenshot of the terminal with the error I compiled G4 with Qt5 with MT flag OFF and all works fine. If I compile G4 with MT flag ON I obtain an error correlated to Qt during the building: Here is the red error from the terminal: G4UIQt.obj : error LNK2019: riferimento al simbolo esterno "protected: static class G4coutDestination * G4coutDestinati on::masterG4coutDestination" (?masterG4coutDestination@G4coutDestination@@1PEAV1@EA) non risolto nella funzione "public : __cdecl G4UIQt::G4UIQt(int,char * *)" (??0G4UIQt@@QEAA@HPEAPEAD@Z) [C:\Users\Andrea\Documents\Geant4\Installazione\ge ant4_10_06MT-build\source\interfaces\G4interfaces.vcxproj] C:\Users\Andrea\Documents\Geant4\Installazione\geant4_10_06MT-build\BuildProducts\Release\bin\G4interfaces.dll : fatal error LNK1120: 1 esterni non risolti [C:\Users\Andrea\Documents\Geant4\Installazione\geant4_10_06MT-build\source\interf aces\G4interfaces.vcxproj] I use Qt 5.12.6 msvc2017_64 I compile G4 also x64.
With Geant4 10.6, only Visual Studio 2019 is supported (see the release notes). Please, update your system to Visual Studio 2019.
Hi, I'm already on Visual Studio 2019. "MSCV2017_64" is the Qt version and it the newest one. Thank you
Thanks for clarifying this. Can you please trying modify the line of code in: source/global/management/include/G4coutDestination.hh:94 to the following: G4GLOB_DLL static G4coutDestination* masterG4coutDestination; recompile and see if the problem gets fixed? Thanks
I modified the line of the code as indicated and recompiled Geant4, but the error occurred again. I have attached another screenshot of the error. Thank you
Created attachment 604 [details] Screenshot of the terminal with the error of the 2th test
Thanks for your feedback. Can you try one more attempt and let us know? 1. Modify that same line to: G4coutDestination* masterG4coutDestination = nullptr; 2. Remove this line in the source code source/global/management/src/G4coutDestination.cc: G4coutDestination* G4coutDestination::masterG4coutDestination = 0; and rebuild.
With the last suggested changes all work fine. Compilation without errors and also the simulation works. Thank you
Thanks for the feedback. The fix will be included in the next patch release.