This application failed to start because it could not find or load the qt platform plugin "windows".



  • Hi everyone,

    I'm actually working on QT5.9 and have this error :
    this application failed to start because it could not find or load the qt platform plugin "windows"
    in "".

    I tried all the answer i could find on other forums but none worked

    The thing is, when i launch the .exe from the computer that generated it, it's working but if i change computer i have this error... Can someone help me for this i cant find a relevant solution.

    I already tried to include platforms\qwindows.dll in my .exe location

    Thanks for reading this topic.


  • Moderators

    @small_bird said in This application failed to start because it could not find or load the qt platform plugin "windows".:

    I already tried to include platforms\qwindows.dll in my .exe location

    That's a good first step, but please follow the whole deployment procedure.


  • Qt Champions 2017

    Hi
    This is also good info (IMHO)
    http://www.tripleboot.org/?p=138



  • This was a big problem for us. In the end it was easy to fix but took several hours, and really should not have, if the error output had been more detailed.

    Background: The previous apps were built using QT5.1. Only after QT5.8 did things change / break. Win10Pro-64 machine.

    What I found:

    • Qt5Core.dll was previously referring to an absolute path on my machine, for dependencies, namely plugins\platforms\qwindows.dll . This worked on mine and another Qt dev colleague's machines because we had Qt5.8 installed with default locations (same absolute path). On other machines the "this application failed to start because it could not find or load the qt platform plugin "windows"
      in ""." message would show up.
    • Modifying Qt5Core.dll to remove the absolute path (using windeploy) made the dependencies path . (relative/current path). Doing this broke the apps running on my dev machine.
    • The reason it broke is that Qt5Core.dll was looking for qwindows.dll in .\plugins\platforms instead of .\platforms like the previous Qt5.1 apps were. Therefore the fix was to move .\platforms into .\plugins and move the updated qwindows.dll file from the Qt5.8 install dir into it (in my case, C:\Qt\Qt5.8.0\5.8\mingw53_32\plugins\platforms)

    Nothing like a message box with mostly useless content to help find where the problem is. Perhaps there is room for improvement there, Qt devs?


  • Moderators

    @laserdyne.rd If you want to ask Qt devs you shouldn't do it here as this is Qt users forum.


  • Moderators

    @laserdyne.rd it's all in the docs, the whole deployment process is described, and all the many ways in which it can/ should be done. Following that will not break your dev installation, and it will work for users who have no Qt installed, too.

    Yeah, though, I definitely agree the error message could be more informative - feel free to open a suggestion on Qt bugtracker or mailing list.

    I've also just noticed the deployment guide is slightly outdated (still mentions Angle as default config option on Windows, which is not true anymore).



  • This is a problem that we are experiencing and the problem is quite frustrating. I should be able to through the environment setup process determine which version of the QT library I wish to use like you can do with Visual Studio (.Net 2.0 ... .Net 4.7.) There should also be an addin that would build a deployable application with all of the needed .DLLs without having to spend ANY TIME trying to figure out what you might need. What would be wonderful is if QT had an install feature that would properly install and configure NetBeans,<your language of choice> and QT with a simple single package.


  • Moderators

    @Wayne-H.-Hamberg You can tell QtCreator which Qt version to use by selecting the Kit for this version.
    Why should Qt(!) provide an installer for NetBeans? You should rather ask NetBeans project for better Qt integration.
    For deployment of Qt application there is already support: http://doc.qt.io/qt-5/deployment.html
    But I agree that it could be further simplified.
    This forum is not the right place to ask for features. You should file a change request on Qt bugtracker.


Log in to reply
 

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