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. Deploying on Windows fails

Deploying on Windows fails

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
12 Posts 5 Posters 2.8k Views
  • 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.
  • R Offline
    R Offline
    remcopoelstra
    wrote on last edited by
    #1

    Hi,

    I'm trying to deploy my application on Windows.
    After following the steps at https://wiki.qt.io/Deploy_an_Application_on_Windows,
    I get the "This application failed to start because it could not find or load the Qt platform plugin "windows"."
    I also followed the recomendations at http://www.tripleboot.org/?p=536 and http://www.tripleboot.org/?p=138,
    even went to the trouble of the debug viewer.
    That last one did not show any more output then the dialogs did (I did set the QT_DEBUG_PLUGINS variable), so I'm a bit lost here.
    I included a screenshot of how my dir currently looks like, but it just a copied of the stuff recommended at the first mentioned website.

    What else can I do to fix this error?

    Thanks in advance.

    Kind regards,

    Remco Poelstra

    JKSHJ 1 Reply Last reply
    0
    • R Offline
      R Offline
      remcopoelstra
      wrote on last edited by
      #2

      And here is the screenshot:
      http://remco.beryllium.net/Capture.PNG

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

        Hi and welcome to devnet,

        You can also use windeployqt to help you prepare the data

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

        R 1 Reply Last reply
        0
        • R remcopoelstra

          Hi,

          I'm trying to deploy my application on Windows.
          After following the steps at https://wiki.qt.io/Deploy_an_Application_on_Windows,
          I get the "This application failed to start because it could not find or load the Qt platform plugin "windows"."
          I also followed the recomendations at http://www.tripleboot.org/?p=536 and http://www.tripleboot.org/?p=138,
          even went to the trouble of the debug viewer.
          That last one did not show any more output then the dialogs did (I did set the QT_DEBUG_PLUGINS variable), so I'm a bit lost here.
          I included a screenshot of how my dir currently looks like, but it just a copied of the stuff recommended at the first mentioned website.

          What else can I do to fix this error?

          Thanks in advance.

          Kind regards,

          Remco Poelstra

          JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by JKSH
          #4

          @remcopoelstra said:

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

          1. What is the full error message? There are a few more sentences after this.
          2. Does your app run correctly when you launch it from Qt Creator?
          3. [EDIT: Question removed]

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          R 1 Reply Last reply
          0
          • JKSHJ JKSH

            @remcopoelstra said:

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

            1. What is the full error message? There are a few more sentences after this.
            2. Does your app run correctly when you launch it from Qt Creator?
            3. [EDIT: Question removed]
            R Offline
            R Offline
            remcopoelstra
            wrote on last edited by
            #5

            @JKSH
            I'm not exactly sure what you mean with a few sentences after that message, so I made screenshots of the dialogs:

            • First dialog
            • Second dialog
            • Third dialog

            The app runs fine in Qt Creator, and with the C:\Qt folder available it also runs from the Deployment folder.

            @SGaist I'll look into windeployqt, hopefully it will solve the problem

            JKSHJ 1 Reply Last reply
            0
            • SGaistS SGaist

              Hi and welcome to devnet,

              You can also use windeployqt to help you prepare the data

              R Offline
              R Offline
              remcopoelstra
              wrote on last edited by
              #6

              @SGaist
              I tried using windeployqt, but in the end that gave the same error.

              1 Reply Last reply
              0
              • R remcopoelstra

                @JKSH
                I'm not exactly sure what you mean with a few sentences after that message, so I made screenshots of the dialogs:

                • First dialog
                • Second dialog
                • Third dialog

                The app runs fine in Qt Creator, and with the C:\Qt folder available it also runs from the Deployment folder.

                @SGaist I'll look into windeployqt, hopefully it will solve the problem

                JKSHJ Offline
                JKSHJ Offline
                JKSH
                Moderators
                wrote on last edited by
                #7

                @remcopoelstra said:

                @JKSH
                I'm not exactly sure what you mean with a few sentences after that message, so I made screenshots of the dialogs:

                • First dialog

                Thanks; this is the one I meant.

                The screenshot tells me that your app couldn't find qwindows.dll

                The app runs fine in Qt Creator, and with the C:\Qt folder available it also runs from the Deployment folder.

                That means your program is looking for something inside C:\Qt\ that you haven't copied to the correct path in your Deployment folder. I can't see what it is from your screenshot though.

                Follow this short tutorial to use ListDLLs: http://kb.froglogic.com/display/KB/Getting+a+list+of+DLLs+currently+loaded+in+a+process#GettingalistofDLLscurrentlyloadedinaprocess-GettinglistofDLLswithListDLLs

                1. Run your app in Qt Creator
                2. When the app is running, use ListDLLs to find out which DLLs are loaded
                3. Close your app
                4. Launch your app from your Deployment folder
                5. When the first error dialog appears, use ListDLLs to find out which DLLs are loaded

                Compare the two lists from #2 and #5. Which DLLs are missing from #5?

                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                1 Reply Last reply
                0
                • R Offline
                  R Offline
                  remcopoelstra
                  wrote on last edited by
                  #8

                  Hi,

                  The short answer seems to be 'none'.
                  If the DLL's are listed in loading order then there are no missing DLL's before the qwindows.dll.
                  All DLL's listed after qwindows.dll are available from the Deployment folder (in the imageformats folder and Qt5Svg.dll).
                  There rest are Windows system dll's.
                  The files are here:
                  Creator's DLLs
                  Deploy DLLs

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    Darek
                    wrote on last edited by
                    #9

                    Can you past here your main function?

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

                      Hi, just guessing, but do you perchance have a qt.conf in your deployment test directory? If so, delete it.

                      1 Reply Last reply
                      0
                      • D Offline
                        D Offline
                        Darek
                        wrote on last edited by Darek
                        #11

                        I had very similar problem. Finally I found, that problem is in my main function. Check please, if your first object action is creating QCoreApplication or QApplication. I had some lines before it and I get error with qwindows.dll.... I just put them after it and all works fine.

                        R 1 Reply Last reply
                        1
                        • D Darek

                          I had very similar problem. Finally I found, that problem is in my main function. Check please, if your first object action is creating QCoreApplication or QApplication. I had some lines before it and I get error with qwindows.dll.... I just put them after it and all works fine.

                          R Offline
                          R Offline
                          remcopoelstra
                          wrote on last edited by
                          #12

                          That solved the problem!
                          I had:
                          QApplication::setStyle("plastique");
                          QApplication a(argc, argv);

                          as the first lines in main(). Commenting out the first line made the application run!
                          Many thanks for all the support!
                          How can I mark this question as resolved?

                          Regards,

                          Remco Poelstra

                          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