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. [solved] Deploying Qt on Windows?
Forum Update on Monday, May 27th 2025

[solved] Deploying Qt on Windows?

Scheduled Pinned Locked Moved General and Desktop
8 Posts 5 Posters 11.6k 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.
  • E Offline
    E Offline
    evocat
    wrote on 30 Jul 2014, 08:17 last edited by
    #1

    Hi,
    how deploying Qt on Windows can be such difficult?

    I'm trying to deploy my app on Windows, so I could sent it to someone to test it. But, I cannot even make an .exe which could start on my own computer without Qt creator?

    I have tried the following:

    1. make release-build on Qt creator
    2. Copy the resulting .exe-file to elsewhere
    3. Try to start it.

    In the beginning, the .exe says that it needs some .dll files. (Of course.)
    I have copied the requested .dll's from C:\Qt\5.3\mingw482_32\bin, but after that, I just get message
    @The application was unable to start correctly (0xc000007b). Click OK to close the application@

    After that, I have tried windeployqt on command line.
    I have used it like:
    @

    cd C:\Qt\5.3\mingw482_32\bin // This is the path where windeployqt.exe lies
    set PATH=C:\Qt\5.3\mingw482_32\bin // Windeployqt want to know where .dll's are
    windeployqt C:\path\to\my\exe

    @

    Which seems to run well and adds .exe's directory full of files, but after all, when I try to start that .exe, it says that it needs some dll's. (As far as I remembe, atleast something like libgcc_s_dw2-1 and libwinpthread-1).
    I have copied those from C:\Qt\5.3\mingw482_32\bin, but once again, the app gives just (0xc000007b) error.

    I have also tried to look that .exe with dependency walker, but I got same problems as here:
    http://stackoverflow.com/questions/17023419/win-7-64-bit-dll-problems , so dependency walker is probably just trying to mislead me for now.

    I don't understand what I have done wrong?

    p.s. I'm running Windows 7 64-bit.

    1 Reply Last reply
    1
    • G Offline
      G Offline
      GrahamL
      wrote on 30 Jul 2014, 08:33 last edited by
      #2

      Hi
      Have you read this guide?
      http://qt-project.org/doc/qt-5/windows-deployment.html

      1 Reply Last reply
      0
      • N Offline
        N Offline
        NetZwerg
        wrote on 30 Jul 2014, 08:35 last edited by
        #3

        Did you also supply the qwindows.dll?

        Application Directory should be setup as:

        icudt51.dll
        icuin51.dll
        icuuc51.dll
        libstdc++-6.dll
        platforms/qminimal.dll (probably not required)
        platforms/qwindows.dll
        libgcc_s_dw2-1.dll
        Q*.dll
        http://stackoverflow.com/questions/17377706/cannot-run-my-exe-file-on-another-computer-application-requested-the-runtime-t/19136598#19136598

        Edit: Typo fix libstc++-6.dll => libstdc++-6.dll

        1 Reply Last reply
        0
        • E Offline
          E Offline
          evocat
          wrote on 30 Jul 2014, 11:44 last edited by
          #4

          [quote author="GrahamL" date="1406709213"]Hi
          Have you read this guide?
          http://qt-project.org/doc/qt-5/windows-deployment.html[/quote]

          Yes, I have been reading it, and tons of other "deploy Qt for windows"-threads and guides. But...
          ...shouldn't windeployqt do all that for me?
          ...if i try to run nmake on windows command line, it says
          @ 'nmake' is not recognized as an interlan or external command, operable program or batch file.@
          Probably I'm doing something wrong, but I don't know what...

          [quote author="NetZwerg" date="1406709338"]Did you also supply the qwindows.dll?

          Application Directory should be setup as:

          icudt51.dll
          icuin51.dll
          icuuc51.dll
          libstc++-6.dll
          platforms/qminimal.dll (probably not required)
          platforms/qwindows.dll
          libgcc_s_dw2-1.dll
          Q*.dll
          http://stackoverflow.com/questions/17377706/cannot-run-my-exe-file-on-another-computer-application-requested-the-runtime-t/19136598#19136598[/quote]
          !!!
          I looked at folder where I had ran windeployqt + added all dll's that my program.exe had asked for.
          It did NOT had
          libstc++-6.dll or
          platforms/qminimal.dll
          in it.

          They all were also missing from my C:\Qt\5.3\mingw482_32\bin.
          But I found
          libstdc++-6.dll
          from there, and tried to add it to my app folder.
          AND IT WORKED!!

          I don't understand why I don't have libstc++-6.dll or why my app didn't asked for it.

          But anyway, THANKS! You saved tons of my time! I'll mark this as solved as soon as I can confirm that my app runs also on someone else's computer.

          1 Reply Last reply
          0
          • N Offline
            N Offline
            NetZwerg
            wrote on 30 Jul 2014, 13:25 last edited by
            #5

            Typo on my side. Funny noone reconized this on my SO-Post ... gonna change both

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 30 Jul 2014, 21:41 last edited by
              #6

              Hi,

              In any case there's also this very good wiki "entry":http://qt-project.org/wiki/Deploy_an_Application_on_Windows

              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
              • E Offline
                E Offline
                evocat
                wrote on 31 Jul 2014, 08:10 last edited by
                #7

                [quote author="NetZwerg" date="1406726719"]Typo on my side. Funny noone reconized this on my SO-Post ... gonna change both[/quote]
                Ok, that explains a lot of thing.

                I tried to do this also without windeployqt, and it seems to work also.

                So, one way to make Qt app to work on any PC (if i still remember what I did) is this:

                1. Make release build on Qt Creator
                2. Copy yourapp.exe to a new, clean folder
                3. Try to run it
                  3.1 Your app will say that it needs some .dll files. Copy them one per time from C:\Qt\5.3\mingw482_32\bin to the folder where your app is.
                  3.2 Now your app will give 0xc000007b error. NOW add libstdc++-6.dll and platforms/qwindows.dll manyally with it.
                4. Now your app starts to ask for some more .dll files. Add them from same location as in step 3.1
                5. Enjoy your running app!
                  (6. do NOT trust dependency walker - it is not going to help you.)

                I can now confirm that this has atleast worked on two different Win7-machines without Qt installed.

                Or actually, sounds are still not working. Does anybody know what could be wrong with them?
                (Yes, I did ship them with the App, and they DO work on my computer. Could it be something related to Qt multimedia? Sounds are played via QSound.)

                [quote author="SGaist" date="1406756512"]Hi,

                In any case there's also this very good wiki "entry":http://qt-project.org/wiki/Deploy_an_Application_on_Windows[/quote]
                Ok, that guide looks also pretty good. Thanks! Weird that I could't find it when trying to solve this issue, maybe it would need some search-engine-optimization....

                p.s. I know that this is a dumb question, but it is legal to ship and publish all those .dll files with your app?

                1 Reply Last reply
                0
                • JKSHJ Offline
                  JKSHJ Offline
                  JKSH
                  Moderators
                  wrote on 31 Jul 2014, 14:13 last edited by
                  #8

                  Hi,

                  [quote]p.s. I know that this is a dumb question, but it is legal to ship and publish all those .dll files with your app?[/quote]That's not a dumb question at all, don't worry. :) The answer is: Yes it's legal, as long as you abide by the LGPL license.

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

                  1 Reply Last reply
                  0

                  1/8

                  30 Jul 2014, 08:17

                  • Login

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