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. Error: application failed to start because it could not find or load the Qt platform plugin "windows"
Forum Updated to NodeBB v4.3 + New Features

Error: application failed to start because it could not find or load the Qt platform plugin "windows"

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 4 Posters 3.1k 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.
  • A Offline
    A Offline
    AntejaVM
    wrote on last edited by
    #1

    ( qt 5.5.1 static version)
    I create qt app, build project with VS2013, but when I debug it I got error
    This application failed to start because it could not find or load the Qt platform plugin "windows".
    How can I fix the error ?

    W 1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      You need to tell qmake in your .pro file to link to the static plugins. See here for instructions.

      1 Reply Last reply
      0
      • XandlX Offline
        XandlX Offline
        Xandl
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • A Offline
          A Offline
          AntejaVM
          wrote on last edited by
          #4

          I don't have .pro file, because I create project in Visual studio. I import plugin in main.cpp .
          But now I have two errors.
          File: C:\ExtLib\Qt\5.5.1\5.5\Src\qtbase\src\corelib\global\qglobal.cpp
          Line: 2966

          ASSERT: "copy" in file C:\ExtLib\Qt\5.5.1\5.5\Src\qtbase\src\corelib\thread\qmutex.cpp, line 525

          1 Reply Last reply
          0
          • Chris KawaC Offline
            Chris KawaC Offline
            Chris Kawa
            Lifetime Qt Champion
            wrote on last edited by
            #5

            I don't have .pro file

            Ah, then you have to link to the missing plugin .lib manually. I don't think the Qt Add-In automates this in any way. It's in the Project Properties -> Linker -> Input -> Additional dependencies.

            1 Reply Last reply
            0
            • A AntejaVM

              ( qt 5.5.1 static version)
              I create qt app, build project with VS2013, but when I debug it I got error
              This application failed to start because it could not find or load the Qt platform plugin "windows".
              How can I fix the error ?

              W Offline
              W Offline
              Wilk
              wrote on last edited by
              #6

              @AntejaVM Hi.

              I would suggest you to do the following:

              1. Go to your Qt instalation folder (like W:/Qt/5.5/msvc2013).
              2. Go to plugins folder.
              3. Copy platforms directory to the directory with you executable.
                4 (optional). Remove *.pdb and *d.dll files.

              Or just add this folder to your PATH environment variable.

              1 Reply Last reply
              0
              • Chris KawaC Offline
                Chris KawaC Offline
                Chris Kawa
                Lifetime Qt Champion
                wrote on last edited by Chris Kawa
                #7

                @Wilk

                Or just add this folder to your PATH environment variable.

                No! That's a terrible advice. Never pollute PATH with anything Qt related. It's completely unnecessary and you can mess up not only your app but any other that uses Qt.

                Besides, the topic is about static linking, so the point is there are no dlls to copy over. The linking needs to be done at compile time to the static plugin versions.

                W 1 Reply Last reply
                0
                • Chris KawaC Chris Kawa

                  @Wilk

                  Or just add this folder to your PATH environment variable.

                  No! That's a terrible advice. Never pollute PATH with anything Qt related. It's completely unnecessary and you can mess up not only your app but any other that uses Qt.

                  Besides, the topic is about static linking, so the point is there are no dlls to copy over. The linking needs to be done at compile time to the static plugin versions.

                  W Offline
                  W Offline
                  Wilk
                  wrote on last edited by
                  #8

                  @Chris-Kawa Sorry, my fault, didn't see that it's about static Qt.

                  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