If I'm using visualization, then a few environmental variables are on. If I'm not using it, then I turn them off. In both cases, though, I may need to link to the motif libraries. For example when I'm not using visualization but I'm using user interface commands. It turns out that: 1) When I'm using visualization, I get no link errors against the motif libraries (I'm setting up openmotif v2_1_30 Linux+2.2) 2) When I'm not using visualization (but using UI commands), geant4 does not seem to locate openmotif v2_1_30 Linux+2.2. Instead, it picks up a system version which needs to be told explicitly about linking to the Xp libraries. For now, I've fixed the problem by adding -lXp to config/sys/Linux-g++.gmk: replaced line 39: XMLIBS := -lXm -lXpm by: XMLIBS := -lXm -lXpm -lXp
Can you please specify which G4 setup you use for cases 1) and 2) ? - For case 1), assuming you use a Motif-based vis-driver, you need to have built your libraries with G4VIS_BUILD_OPENGLXM_DRIVER (for OpenGL), and have G4VIS_USE_OPENGLXM set when you build/run your application. - For case 2), assuming you use the Motif UI driver, you must have built your libraries with G4UI_BUILD_XM_SESSION, and have G4UI_USE_XM set when you build/run your application. If the above conditions are satisfied, the setup for Motif is essentially the same for vis/UI and you should not have any mis-match. The use/non-use of the Motif-based drivers is controlled by setting/unsetting the G4VIS_USE_* and G4UI_USE_* variables in your environment at the time you build/run your application.
No futher user response. Assume configuration corrected.