Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt application tries to load the wrong platform plugin
Qt 6.11 is out! See what's new in the release blog

Qt application tries to load the wrong platform plugin

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 1.3k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    Wilco
    wrote on last edited by
    #1

    I have build a small program and I'm trying to deploy it to my second computer. When I start it on my second computer I get the error:
    This application failed to start because it could not find or load the Qt platform plugin "windows". Available platform plugins are: minimal, offscreen, windows, windows. Reinstalling the application may fix this problem.
    After a bit of experimenting it turns out it is trying to load the platform pluging from the Qt sdk in the folder C:\Qt\5.4\mingw491_32\plugins\platforms. And since it is a different revision of qt it cannot load that plugin. When I move this folder away my application just starts normal.
    How can I fix this so my application will run normal without messing up my qt install?

    The application is build with qt 5.4.0 mingw491_32. On my second computer, where I try to run the application, I have Qt 5.4.1 mingw491_32

    1 Reply Last reply
    1
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Did you properly deploy your application ? e.g. using windeployqt ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • W Offline
        W Offline
        Wilco
        wrote on last edited by
        #3

        I did. And when I deploy it the same way to a different computer that does not have a qt sdk installed it just works.

        1 Reply Last reply
        0
        • hskoglundH Offline
          hskoglundH Offline
          hskoglund
          wrote on last edited by
          #4

          Hi, this is an unfortunate side-effect of the installation of Qt; the directory you specify when you install Qt is written into Qt5Core.dll. The plugins subdirectory is stored in Qt5Core.dll as well (in Qt v5.4 not in v5.5) and in your case that's C:\Qt\5.4\mingw491_32\plugins.
          This is for helping Qt Creator launch your application, i.e. when your app starts it looks for plugins in the directory written in Qt5Core.dll and in 4 other places, I write more here.

          And because you have the same installation path on both PCs but different Qt versions you get this funny error. 2 ways to solve this I think:

          1. Reinstall Qt on one of your PCs with another path than C:\Qt\5.4\ming491_32
          2. Binary edit the copy of Qt5Core.dll that windeployqt puts into your directory, so that the path points somewhere else (there is an editing example in my blog post in the link above).
          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved