Deploying Qt application



  • Hi, I have 'finished' my qt application and now i want to deploy it but have problemes..

    In Debug mode I can compile and run (from Qt Creator) my app without errors. But if i try to run it with myApp.exe (after adding Qt dlls) I have an error saying :

    entry point procedure _ZdaPvj could not be found in libstdc++-6.dll

    then I add libstdc++-6.dll and try to restart app, and now i have no errors when i double click on myApp.exe, it just don't start.

    Other probleme is, when i switch to Release mode,it looks like my app Compiles witout errors but crashes if i try to run (even from Qt creator).

    Im using Qt 5.8.0 MinGW 32bit
    Im including/using open62541.h/.cpp (free OPC UA implementation https://open62541.org/)

    Thx in advance for help
    LA


  • Moderators

    @LeLev You should take a look at http://doc.qt.io/qt-5/windows-deployment.html
    If your app crashes in release mode when starting from QtCreator then you most probably have an issue in your code. You should take a look at the stack trace when it crashes.



  • Hi ! Are you using any other libraries than Qt's ?

    I had this problem not that far ago and i wonder if it was not due to the fact i used the wrong library file.
    Like using the release for the debug one or something like that...

    It may be something completely different but check that too



  • @jsulm,
    When my app crashs in release mode i have nothing interesting in stack trace :

    11:26:24: Start : "C:\Qt\Tools\mingw530_32\bin\mingw32-make.exe"
    C:/Qt/Tools/mingw530_32/bin/mingw32-make -f Makefile.Release
    mingw32-make[1]: Entering directory 'C:/Users/user/Documents/build-16K-Desktop_Qt_5_8_0_MinGW_32bit-Release'
    mingw32-make[1]: Nothing to be done for 'first'.
    mingw32-make[1]: Leaving directory 'C:/Users/user/Documents/build-16K-Desktop_Qt_5_8_0_MinGW_32bit-Release'
    11:26:25: Le processus "C:\Qt\Tools\mingw530_32\bin\mingw32-make.exe" ended normaly.
    11:26:25: Time : 00:01.

    @Sillimon, i'm only using open62541.h/.cpp (free OPC UA implementation protocole https://open62541.org/)
    i added unix|win32 : LIBS += -lWS2_32 in my .pro file because open62541 needs ws2_32.dll

    Thx to you two



  • So it only works in Debug from QtCreator...
    Could it be a variable or pointer problem ? That could make the difference between debug and release ?
    Verify initialization of those, maybe ?



  • @LeLev
    theres can be a ton of different reasons, why the release build crashes but the debug one not

    here's a good List to check

    list

    The number one reason for me, so far, was always Variable initialization hence my ever growing habit of initializing EVERYTHING ;-)



  • Thx very much guys! i finally changed Qt version, from 5.8 to 5.10 now its working fine!
    Thx


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.