Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Could not find or load the Qt platform plugin "windows"
Forum Updated to NodeBB v4.3 + New Features

Could not find or load the Qt platform plugin "windows"

Scheduled Pinned Locked Moved Solved Installation and Deployment
23 Posts 4 Posters 20.8k 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.
  • ZoltanZ Offline
    ZoltanZ Offline
    Zoltan
    wrote on last edited by
    #1

    Dear all,

    Even after running the windeployqt.exe (also tried with the --release flag), I got the following error:

    The application failed to start because it could not find or load the Qt platform plugin "windows" in "". Available platform plugins are: windows.
    
    I have the qwindows.dll in the platforms subfolder which is a common cause. I also looked at all the related Stackoverflow answers but none of them solved my problem. The dependency walker shows several errors. What do you recommend?
    I use Visual Studio 2013 with release build.
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What does dependency walker show ?

      Do you have only one version of Qt installed ?

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

      ZoltanZ 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        What does dependency walker show ?

        Do you have only one version of Qt installed ?

        ZoltanZ Offline
        ZoltanZ Offline
        Zoltan
        wrote on last edited by
        #3

        @SGaist said in Could not find or load the Qt platform plugin "windows":

        Hi,

        What does dependency walker show ?

        Do you have only one version of Qt installed ?

        I have only one version of Qt installed.
        The dependency walker shows in red in the tree view the following items:

        • QT5CORE.dll
          • MSVCP120.dll (shortcut icon)
          • MSVCR120.dll (shortcut icon)
        • QT5WIDGETS.dll
          • QT5GUI.dll
            • QT5CORE.DLL (shortcut icon)
            • MSVCP120.dll (shortcut icon)
            • MSVCR120.dll (shortcut icon)
          • QT5CORE.DLL (shortcut icon)
          • MSVCP120.dll (shortcut icon)
          • MSVCR120.dll (shortcut icon)

        In the bottom it shows:

        Error: At least one required implicit or forwarded dependency was not found.
        Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
        Error: Modules with different CPU types were found.
        Warning: At least one delay-load dependency module was not found.
        Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.
        

        Here is a screenshot: http://imgur.com/QVPlTx5

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

          You should add the MSVC*120.dll alongside your application.

          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
          • ZoltanZ Offline
            ZoltanZ Offline
            Zoltan
            wrote on last edited by
            #5

            I copied but it did not solve.

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

              Try creating a plugins subfolder next to your .exe file, and copy the platforms subfolder into that (so you get the same directory structure as in Qt's MSVC installation, normally C:\Qt\5.7\msvc2013\plugins).

              ZoltanZ 1 Reply Last reply
              0
              • hskoglundH hskoglund

                Try creating a plugins subfolder next to your .exe file, and copy the platforms subfolder into that (so you get the same directory structure as in Qt's MSVC installation, normally C:\Qt\5.7\msvc2013\plugins).

                ZoltanZ Offline
                ZoltanZ Offline
                Zoltan
                wrote on last edited by
                #7

                @hskoglund said in Could not find or load the Qt platform plugin "windows":

                Try creating a plugins subfolder next to your .exe file, and copy the platforms subfolder into that (so you get the same directory structure as in Qt's MSVC installation, normally C:\Qt\5.7\msvc2013\plugins).

                I tried it but in vain.

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

                  Hmm, is your app a Widgets app? In your main.cpp, you're not doing anything fancy before QApplication a(argc, argv);?

                  ZoltanZ 1 Reply Last reply
                  0
                  • hskoglundH hskoglund

                    Hmm, is your app a Widgets app? In your main.cpp, you're not doing anything fancy before QApplication a(argc, argv);?

                    ZoltanZ Offline
                    ZoltanZ Offline
                    Zoltan
                    wrote on last edited by
                    #9

                    @hskoglund said in Could not find or load the Qt platform plugin "windows":

                    Hmm, is your app a Widgets app? In your main.cpp, you're not doing anything fancy before QApplication a(argc, argv);?

                    QApplication a(argc, argv); is my first line. And the app is a Widgets app. But I am pretty sure that the problem is with the two VS runtime dll-s as Dependency Walker refers to them everywhere.

                    ZoltanZ 1 Reply Last reply
                    0
                    • ZoltanZ Zoltan

                      @hskoglund said in Could not find or load the Qt platform plugin "windows":

                      Hmm, is your app a Widgets app? In your main.cpp, you're not doing anything fancy before QApplication a(argc, argv);?

                      QApplication a(argc, argv); is my first line. And the app is a Widgets app. But I am pretty sure that the problem is with the two VS runtime dll-s as Dependency Walker refers to them everywhere.

                      ZoltanZ Offline
                      ZoltanZ Offline
                      Zoltan
                      wrote on last edited by
                      #10

                      @Zoltan said in Could not find or load the Qt platform plugin "windows":

                      @hskoglund said in Could not find or load the Qt platform plugin "windows":

                      Hmm, is your app a Widgets app? In your main.cpp, you're not doing anything fancy before QApplication a(argc, argv);?

                      QApplication a(argc, argv); is my first line. And the app is a Widgets app. But I am pretty sure that the problem is with the two VS runtime dll-s as Dependency Walker refers to them everywhere.

                      One additional info: as you can see in the linked screenshot, Dependency Walker says: "Modules with different CPU types were found". The GUI part is compiled as x86, while the VS part as x64. So I changed the kit to 32 bit VS, and the result is that now even inside QtCreator the same error occurs.

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

                        Aha, well if you change the kit, please delete the stuff that windeployqt copied (actually the whole build folder). Then when you start a fresh build it should be fine.

                        ZoltanZ 1 Reply Last reply
                        0
                        • hskoglundH hskoglund

                          Aha, well if you change the kit, please delete the stuff that windeployqt copied (actually the whole build folder). Then when you start a fresh build it should be fine.

                          ZoltanZ Offline
                          ZoltanZ Offline
                          Zoltan
                          wrote on last edited by
                          #12

                          @hskoglund The same error unfortunately.

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

                            Well your Qt Creator works (I mean you can start it), and that is a 32-bit MSVC2013 Release build, so your 32-bit MSVC2013-kit should work.

                            Try creating a vanilla Widgets app from scratch, if it works launching from Qt Creator, try running windeployqt on it and see if it starts when you double-click it.

                            1 Reply Last reply
                            0
                            • ZoltanZ Zoltan

                              @hskoglund The same error unfortunately.

                              ZoltanZ Offline
                              ZoltanZ Offline
                              Zoltan
                              wrote on last edited by
                              #14

                              @Zoltan said in Could not find or load the Qt platform plugin "windows":

                              @hskoglund The same error unfortunately.

                              But in QtCreator,

                              qmake.exe Z.pro -spec win32-msvc2013
                              

                              is written, which is strange, as I chose 64 bit VS compiler. How can I change it to 64 bit also?

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

                                Try exiting Qt Creator, delete your .pro.user file and open your .pro file. Then you should be able to select the kit again.

                                ZoltanZ 2 Replies Last reply
                                1
                                • hskoglundH hskoglund

                                  Try exiting Qt Creator, delete your .pro.user file and open your .pro file. Then you should be able to select the kit again.

                                  ZoltanZ Offline
                                  ZoltanZ Offline
                                  Zoltan
                                  wrote on last edited by
                                  #16

                                  @hskoglund said in Could not find or load the Qt platform plugin "windows":

                                  Try exiting Qt Creator, delete your .pro.user file and open your .pro file. Then you should be able to select the kit again.

                                  I created a vanilla project from scratch and that worked for 32 bit. Then I deleted the .pro.user file and set the build to 32 bit VS. After running the windeployqt tool, it starts outside QtCreator. I am very grateful for your advices!

                                  1 Reply Last reply
                                  0
                                  • hskoglundH hskoglund

                                    Try exiting Qt Creator, delete your .pro.user file and open your .pro file. Then you should be able to select the kit again.

                                    ZoltanZ Offline
                                    ZoltanZ Offline
                                    Zoltan
                                    wrote on last edited by
                                    #17

                                    @hskoglund How can I accept your answer? I don't see the right icon.

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

                                      Huh? Don't know since the new forum style appeared. I think either click on the "Unsolved" rectangle on top, or click on the "totem pole" belonging to your first post?

                                      1 Reply Last reply
                                      0
                                      • ZoltanZ Zoltan

                                        @hskoglund How can I accept your answer? I don't see the right icon.

                                        kshegunovK Offline
                                        kshegunovK Offline
                                        kshegunov
                                        Moderators
                                        wrote on last edited by
                                        #19

                                        @Zoltan
                                        You can select a specific answer as the solution by clicking the three dots corresponding to it and selecting Mark this post as the correct answer. Incidentally this will also mark the thread as solved. You can give reputation points with the little arrows below the post (left of the three dots).

                                        Read and abide by the Qt Code of Conduct

                                        ZoltanZ 1 Reply Last reply
                                        0
                                        • kshegunovK kshegunov

                                          @Zoltan
                                          You can select a specific answer as the solution by clicking the three dots corresponding to it and selecting Mark this post as the correct answer. Incidentally this will also mark the thread as solved. You can give reputation points with the little arrows below the post (left of the three dots).

                                          ZoltanZ Offline
                                          ZoltanZ Offline
                                          Zoltan
                                          wrote on last edited by
                                          #20

                                          @kshegunov I could give reputation but clicking on the three dots didn't offer me to accept an answer (see this image: http://imgur.com/mPmTemH).

                                          ZoltanZ kshegunovK 2 Replies 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