I have an application for which the UI and the OGL visualization stopped working when going from Geant4.10.05p01 to Geant4.10.06. No warnings, no messages, without visualization it runs fine and does what it is supposed to do (well, hopefully). Example B2a works fine, showing the GUI and the visualization.
I think I tracked it now down to the fact that in Geant4.10.06 the preprocessor macros G4UI_USE and G4VIS_USE are not set anymore. In my main()-program, all the calls to the visManager or the UImanager are protected by the mentioned preprocessor commands, as recommended in the G4 Book for Application Developers “Introduction to Visualization” (v.10.6). So neither visManager nor UImanager are invoked, the application runs, and exits. In fact, in the release notes to 4.10.6, it says under
- Items for migration of the user code
“The preprocessor macros G4UI_USE and G4VIS_USE are removed”
And in fact, example B2a does not use these macros (and therefore visualization works).
Now, to me, it seems there s a contradiction to what the “Book for Application Developers” suggests and what is actually implemented in Geant4.10.06. For me, the easiest would be to set the preprocessor variables somehow, but it is not clear to me how I can do this. I tried to pass them to the
cmake-command with the -D-flag, or set them as a environmental variable on the commandline, but that didn’t work (I use the -DG4UI_NONE=FALSE -DG4VIS_NONE=FALSE options with cmake, I don’t know if they did anything with 4.10.05, but in 4.10.06 cmake says
Manually-specified variables were not used by the project:
So how do I set these variables/macros?
Any help is welcome!