Important: Please read the Qt Code of Conduct -

QT and OpenCascade

  • Hello everyone, I'm using QT and the CAD libraries OpenCascade. I'm working on a visualizer but when I run the code the application output shows "The program has unexpectely finished. The process was ended forcefully." even though there are no errors in the code. Then I run the debugger and a popup appears showing "The CDB process terminated" I'm working on Windows 10, the kit is Visual Studio 2019 and qt 5.15.0. What could the problem be? Thanks

  • Lifetime Qt Champion

    Like here?

    When you run the the app in non debug, it never starts but crashes at once ?
    It could be you need some OpenCascade dlls in build folder or
    add path to the fodler wher eit can find it in Projects - environment
    alt text

  • Hi @mrjj, yes, it happens just like in the link and it crashes in non debug run, I added the bin location of OpenCascade to the "Path" variable in System Environment but it doesn't work. Do I have to create another variable for the dlls or what else can I do? Thanks

  • Lifetime Qt Champion

    No that should be it.

    When it crash from very start its off DLL related.

    Are you sure whatever OpenCascade DLLs you are using are for the compiler you are using for the app?

  • I have the exact same problem, also on Windows with VS19. Using Qt6.
    I've compiled Opencascade 7.5.0 from sources to make sure it is compatible with VS19.

    The path to the dll's is specified, but it crashes immediately on execution. Can't debug because the debugger crashes.
    It crashes as soon as I include an Opencascade header file without using anything else from Opencascade.
    Any ideas how to resolve this? Thank you!

  • Replying to myself, in case someone else has this problem in the future.
    I've started the VS debugger from the command line, thanks to the tip from SO

    devenv /debugexe 'program name' 'program arguments'

    Executing the app from within Visual Studio gave error messages that freetype.dll and FreeImage.dll were missing. After adjusting the PATH variable to point to those dll's, everything works now.

Log in to reply