Can not run exampleB1.exe with qt5.14.1

Hi everyone, I’m a beginner of Geant4. I have build and installed Geant4_10_06 with Qt 5.14.1. When I was trying to execute exampleB1, some error arose. It show a dialogue box saying that exampleB1 can not find input point on Qt5OpenGl.dll. (MY system language is Chinese in the screenshot,sry, but it’s saying that.)
exeError

I think it is because .lib file which I used to generate the exampleB1.exe is not matching the .dll file. But after I delete all others Qt5OpenGl.dll in older version, it still gave this error.
Then I tried to run exampleB1.exe through qtcmd.
qtcmd

It was opend but couldn’t run init_vis.mac and give errors as

    Geant4 version Name: geant4-10-06-patch-01 (14-February-2020)

    Copyright : Geant4 Collaboration

    References : NIM A 506 (2003), 250-303

    : IEEE-TNS 53 (2006), 270-278

    : NIM A 835 (2016), 186-225

    WWW : http://geant4.org/

    **************************************************************

    <<< Reference Physics List QBBC

    Visualization Manager instantiating with verbosity "warnings (3)"...

    Visualization Manager initialising...

    Registering graphics systems...

    You have successfully registered the following graphics systems.

    Current available graphics systems are:

    ASCIITree (ATree)

    DAWNFILE (DAWNFILE)

    G4HepRep (HepRepXML)

    G4HepRepFile (HepRepFile)

    RayTracer (RayTracer)

    VRML1FILE (VRML1FILE)

    VRML2FILE (VRML2FILE)

    gMocrenFile (gMocrenFile)

    OpenGLImmediateQt (OGLIQt, OGLI)

    OpenGLStoredQt (OGLSQt, OGL, OGLS)

    OpenGLImmediateWin32 (OGLIWin32, OGLIQt_FALLBACK)

    OpenGLStoredWin32 (OGLSWin32, OGLSQt_FALLBACK)

    Registering model factories...

    You have successfully registered the following model factories.

    Registered model factories:

    generic

    drawByAttribute

    drawByCharge

    drawByOriginVolume

    drawByParticleID

    drawByEncounteredVolume

    Registered filter factories:

    attributeFilter

    chargeFilter

    originVolumeFilter

    particleFilter

    encounteredVolumeFilter

    You have successfully registered the following user vis actions.

    Run Duration User Vis Actions: none

    End of Event User Vis Actions: none

    End of Run User Vis Actions: none

    Some /vis commands (optionally) take a string to specify colour.

    "/vis/list" to see available colours.

    ERROR: Can not open a macro file <init_vis.mac>. Set macro path with "/control/macroPath" if needed.

    -------- WWWW ------- G4Exception-START -------- WWWW -------

    *** G4Exception : UIMAN0123

    issued by : G4UImanager::ApplyCommand

    Command aborted (400)

    Error code : 400

    *** This is just a warning message. ***

    -------- WWWW -------- G4Exception-END --------- WWWW ------- 


Dose anyone know where is the problem? And how can I fix this?

I’m not sure about the Qt font error (@lgarnier will have better knowledge here!), but the macro error is likely due to the application being run from/with a working directory which doesn’t contain the init_vis.mac file. If you run from a directory containing that file (it should be where you built exampleB1), things should run o.k., otherwise run exampleB1.exe passing it the full path to init_vis.mac, e.g.

> exampleB1.exe <fullpathto>/init_vis.mac

That may not totally work due to batch vs interactive running, but can at least help to diagnose any issues.

Thank you for the advie!
I’m quite sure that I put exampleB1.exe and all macro in same directory. It seems that they just can not find each other and QT’s .dll(not sure). Anyway, I run exampleB1.exe through windeploy, qt UI was opened successfully. BUT, It still can’t call macro files unless I add paths to macro files using /control/macroPath <path to macro> by myself. Although it is confusing and annoying, I can use it now. And I will creat new some new topic for other problems. Thank you again for your advice. :smile: