Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Not able to start application



  • Hi,

    We have an application which we are able to run from Qt creator tool. However, when I build the image and run the GUI.exe in the build folder, it asks me to provide dlls. Hence I copy the required dlls (QT5widgets.dll, hidapi.dll etc...) in the folder of the exe file and run. But it later shows that the application is unable to start as below
    bd45963b-8d8e-4ee2-984a-3d1fe058e3de-image.png
    What am I missing. The version of QT used is 5.14

    Thanks in advance for your help

    Regards
    Sachin



  • hi @SachinBhat

    You need to properly deploy your application
    https://doc.qt.io/qt-5/deployment.html



  • Hi Lelev,

    Thanks for the response. I tried to build in the release mode. Unfortunately, I get the same issue. I can run the application in debug mode and through the QTcreator run command

    Thanks
    Sachin



  • Lelev,

    Could you please explain the difference when i deploy and run vs run via qt creator tool

    What procedure can i use to debug the gui application crash?

    Thanks
    Sachin



  • Lelev,

    One more discovery i made is that the gui crashes before starting when i try to run from QT creator tool in release mode

    It works only in debug mode when i run the application

    Appreciate your help

    Thanks
    Sachin


  • Qt Champions 2019

    @SachinBhat said in Not able to start application:

    Could you please explain the difference when i deploy and run vs run via qt creator tool

    QtCreator prepares the environment to run your app before starting it, so it finds all libs and plug-in.
    If you want to start your app outside of QtCreator you need to deploy it first. You will then get a directory containing your app and all needed libs and plug-ins.



  • @jsulm I got a build_<version>_Release folder when I deployed it. Does that mean the dlls copied here have some issue compared to the ones in Qt library?

    Could you please infer what could be going wrong?

    Should I install QT afresh?

    Thanks
    Sachin


  • Qt Champions 2019

    @SachinBhat If your app crashes in release mode even in QtCreator you should first find out why before deploying.
    One reason could be that it tries to load debug libs.
    Another one can be a bug in your code which does not cause a crash in debug mode but in release mode.


Log in to reply