|Message: Installation-Feedback/Tips for Geant4.10.2 with QT5.X (on Win7)||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
Hi all, so I've literally spend days to get things to work at my place and thought it would be nice to give feedback for other desperate souls with maybe similar problems. The goal was/is to get geant4_10_02 running under windows7 with QT-Visualisation. Things I used: > Visual Studio 2013 Community (also tested with VS2015 Community) > cmake-3.4.1 (win32, x86) > QT 5.5.1 (also tested with QT 5.4.2) - windows-x86-msvc2013 > geant4_10_02 Install Steps: 1) Install QT at desired location (for example C:\QT) 2) Set Environment-Variables (its important to set the QT-Variables BEFORE installing G4!). My Variables are: > Name: QMAKESPEC > Value: C:\Qt\Qt5.5.1\5.5\msvc2013\mkspecs\win32-msvc2013 > Name: QTDIR > Value: C:\Qt\Qt5.5.1\5.5 > Name: PATH (append or insert into possibly existing value-entrys! Seperate multiple entrys with ";") > Value: ...;C:\Qt\Qt5.5.1\5.5\msvc2013\bin;... 3) IMPORTANT (I guess this issue arises because Geant4 doesnt support multithreadding under windows yet): Unpack your Geant4-Archiv and go to "...\geant4_10_02\source\interfaces\basic\src\". Edit the File "G4UIQt.cc": -> Line 196: // explicitly request that cout/cerr messages from threads are ALSO propagated to the master. masterG4coutDestination = this; ---> Edit to: #ifdef G4MULTITHREADED // explicitly request that cout/cerr messages from threads are ALSO propagated to the master. masterG4coutDestination = this; #endif -> Line 236: masterG4coutDestination = 0; // set to cout when UI is deleted ---> Edit to: #ifdef G4MULTITHREADED // CHANGED masterG4coutDestination = 0; // set to cout when UI is deleted #endif 4) Now follow the Installation Guide <http://cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/> from the offcial page! (namely: 2.2. Building and Installing on Windows Platforms) It's important to set the "Geant4_USE_QT" Option ON! Either switch it on in the Cmake-UI or set an extra Argument in the Command promt. If you use the CommandPromt be aware that you have to choose the "VS20XX x86 Native Tools Command Prompt" and not the deafult one. Else your Environment-Variables aren't set. The following line should work: cmake -DGEANT4_INSTALL_DATA=ON -DCMAKE_INSTALL_PREFIX=".../Geant4/geant4_10_02-install" -DGEANT4_USE_OPENGL_WIN32=ON -DGEANT4_USE_QT=ON ".../Geant4/geant4_10_02" (you have to be in your geant4_10_02-build directory! Also change the Install-Prefix to the desired path and the last path to your geant4 Path!) 5) Now one should have a geant4_10_02-build directory with lots of files. Just get into it with the CommandPromt (again the VS-One!) and type: cmake --build . --config RelWithDebInfo --target install 6) Almost done! Hopefully the installation process worked out without errors. Else get back and check if you've done everything right (also READ the Installation Guide! Its awesome and a lot can be answered in there :)) Now one has to set the Environment-Variables for Geant4 Datasets. Thats a little bit confusing especially because the "How to set Environment-Variables" Chapter in the Installation Guide comes after the "Building Applications" wich won't work if the Environment-Vars aren't set. So just move forward to "3.3. Note on Geant4 Datasets", set all the Environment-Vairables and get back in the Chapters. (for example: Name: G4ENSDFSTATEDATA | Value: "...\geant4_10_02-install\share\Geant4-10.2.0\data\G4ENSDFSTATE1.2") 7) IMPORTANT2: CMake gives an error if you try to build an example now. This comes from CMake wanting QT Version 4.XX (we have 5.XX; no Idea why its not configuring itself automaticly). To bypass this error get to the "...\geant4_10_02-install\lib\Geant4-10.2.0" directory and edit the file "Geant4Config.cmake": -> Line 244: "find_package(Qt4 REQUIRED)" ---> Edit to: "#find_package(Qt4 REQUIRED)" 8) Done. Now try to build and run exampleB1 (how to-> see Installation Guide). As a side note: It CAN happen that you have multiple Qt.dll's on your PC. (for example if you're using MikTeX for Latex) If thats the case be sure that your Environment-Variables are linking to the correct Qt.dll's! Else you will get errors like "Procedure entry Point could not be located in... QtXXX.dll"! I hope this helps some people or provides some usefull Feedback (especially concerning the errors) for the developers. Greetings, Andreas [ MIME part of type text/html without a name stripped ]
|Inline Depth:||Outline Depth:||Add message:|