QT 51 runtime error on windows



  • I've written an app with Qt 5.1.(my first c++ app) It runs fine on the machine with Qt installed, but when I attempt to deploy the executable to another windows machine where Qt is not installed, I get an error box that says- "Microsoft Visual C++ Runtime Library" - Runtime Error, This app has requested the Runtime to terminate it in an unusual way....

    I've spent some time researching and reading docs but cannot figure it out. Qt is installed with mingw.

    When I profile the app with dependancy walker, msvcrt.dll shows up red and appears to give an error with a _get_output_format functions. The log at the bottom also shows 2 getprocaddress errors associated with msvcrt.dll, specified procedure cannot be found associated with the .exe I'm running and again with the icuuc51.dll. The icuuc51.dll line is specific to the _get_output_format function.

    Just below those 2 red errors in the log it also says "Failed to load platform plugin "windows". Available platforms are:, then a blank line. I have a "plugins" folder that currently contains the qwindows.dll file from Qt 51. I'm not aware of any other plugins I'm using for the app, but I could be wrong.

    The folder where I have the .exe contains all the .dll's that came up as err's when i first started plus any I've found while researching, here's a list

    Qt5widgets
    Qt5Gui
    Qt5Core
    qminimal
    msvcrt
    msvcr100
    msvcp100
    msjava
    mpr
    libwinpthread-1
    libstdc++-6
    libglesv2
    libgcc_s_dw2-1
    libegl
    icuuc51
    icuin51
    icudt51
    d3dcompiler

    Any help would be appreciated. Thanks.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    You are at least missing the windows platform plugin, have a look at the "deployement":https://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html documentation

    Hope it helps


  • Moderators

    That plugins folder should actually be platforms.

    So you should have platforms/qwindows.dll inside your executable's directory.

    Also when I saw a similar problem to this I found out a plugin I was using didn't have the required dlls in the exe folder. I recommend using a dependency walker like depends.exe to find what is missing. Move the plugin to your root exe dir and run depends on it.

    It will tell you what is missing, then move your plugin back to the plugins dir when it's all clear.



  • Thanks for the help. After renaming the plugins folder to platforms, my app runs fine without the QT environment installed. After seeing this, I went back and re-read the docs and found that I simply missed that folder name. Thanks.


Log in to reply
 

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