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. Deploying Qt 5.6 on Windows problem
Forum Updated to NodeBB v4.3 + New Features

Deploying Qt 5.6 on Windows problem

Scheduled Pinned Locked Moved Solved General and Desktop
deploymentwindowsdll
9 Posts 6 Posters 10.5k 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.
  • J Offline
    J Offline
    Joel Bodenmann
    wrote on 15 May 2016, 19:05 last edited by
    #1

    I updated from Qt 5.4 to Qt 5.6 and wanted to deploy my application as I did so many times before using the windeployqt tool. I never had issues with it and everything worked out of the box but not this time. I can't figure out what the issue is or how to fix it so any help would be highly appreciated.

    I'm using Qt 5.6 with MinGW 4.9.2 32-bit on a Windows 10 64-bit machine. After I run windeployqt I get the expected result:

    However, when I double-click the executable I get the following error: The program can't start because libgcc_s_dw2-1.dll is missing from your computer.. Fair enough, I manually copy that file from C:\Qt\5.6\mingw49_32\bin to the directory and then I get the next error: The application was unable to start correctly 0xc000007b. And this is where I am completely lost. Starting the executable from the terminal doesn't give any debug message. It just doesn't do anything.

    Can anybody help me with that? I am completely lost.

    Industrial process automation software: https://simulton.com
    Embedded Graphics & GUI library: https://ugfx.io

    1 Reply Last reply
    0
    • H Online
      H Online
      hskoglund
      wrote on 15 May 2016, 20:06 last edited by
      #2

      Hi, guessing you have Code::Blocks installed? (or something similar installed on May 11th).
      it's possible you have 2 different (one 32-bit and one 64-bit) versions of MinGW installed. The file libgcc_s_sjlj-1.dll shouldn't be there (it doesn't like to be together with libgcc_s_dw2-1.dll) see more here](http://www.sfml-dev.org/tutorials/2.3/start-cb.php)

      J 1 Reply Last reply 15 May 2016, 20:48
      0
      • H hskoglund
        15 May 2016, 20:06

        Hi, guessing you have Code::Blocks installed? (or something similar installed on May 11th).
        it's possible you have 2 different (one 32-bit and one 64-bit) versions of MinGW installed. The file libgcc_s_sjlj-1.dll shouldn't be there (it doesn't like to be together with libgcc_s_dw2-1.dll) see more here](http://www.sfml-dev.org/tutorials/2.3/start-cb.php)

        J Offline
        J Offline
        Joel Bodenmann
        wrote on 15 May 2016, 20:48 last edited by
        #3

        @hskoglund Thank you for your reply.
        I don't have Code::Blocks installed but I have other MinGW versions (through cygwin) on my system. However libgcc_s_sjlj-1.dll was copied to that directory by the windeployqt tool. I assume that it pulls the correct files from the MinGW distribution that comes with the Qt installation (the one from C:\Qt\5.6\mingw49_32\bin\).

        Anyway, I removed the file but the issue remains. How do I make sure that I get the proper version of the DLLs (32-bit vs. 64-bit)? I assumed that windeployqt would take care of all of this.

        Industrial process automation software: https://simulton.com
        Embedded Graphics & GUI library: https://ugfx.io

        1 Reply Last reply
        0
        • H Online
          H Online
          hskoglund
          wrote on 15 May 2016, 21:58 last edited by
          #4

          Hmm windeployqt can get confused where to pick up the compiler dlls.

          Looking at the MinGW files in your listing, these 2 important ones have the wrong date/time and size:
          libstdc++-6.dll
          libwinpthread-1.dll
          (the other 2 libEGL.dll, libGLESV2.dll and opengl32sw.dll are correct).

          Try do the same with libstdc++-6.dll and libwinpthread-1.dll as you did with libgcc_s_dw2-1.dll, i.e. copy them manually from C:\Qt\56.\mingw49_32\bin

          J 1 Reply Last reply 15 May 2016, 22:37
          2
          • H hskoglund
            15 May 2016, 21:58

            Hmm windeployqt can get confused where to pick up the compiler dlls.

            Looking at the MinGW files in your listing, these 2 important ones have the wrong date/time and size:
            libstdc++-6.dll
            libwinpthread-1.dll
            (the other 2 libEGL.dll, libGLESV2.dll and opengl32sw.dll are correct).

            Try do the same with libstdc++-6.dll and libwinpthread-1.dll as you did with libgcc_s_dw2-1.dll, i.e. copy them manually from C:\Qt\56.\mingw49_32\bin

            J Offline
            J Offline
            Joel Bodenmann
            wrote on 15 May 2016, 22:37 last edited by Joel Bodenmann
            #5

            Well now it's actually working.
            Thank you very much, I appreciate your help a lot!

            Is there any way to tell windeployqt to only pick the DLLs from the MinGW distribution that came as part of the Qt installation? It seems to be a "pointless tool" otherwise (to exaggerate a bit).

            Industrial process automation software: https://simulton.com
            Embedded Graphics & GUI library: https://ugfx.io

            T 1 Reply Last reply 22 Oct 2020, 10:33
            0
            • D Offline
              D Offline
              dan_ibis
              wrote on 17 Oct 2016, 20:32 last edited by
              #6

              FYI for others... I had the same issue when upgrading from 5.5 to 5.6. Copying those three files did the trick.

              1 Reply Last reply
              0
              • K Offline
                K Offline
                Kent2u
                wrote on 4 Oct 2018, 14:17 last edited by
                #7

                I am grateful that I came across this thread. It exactly solved my problem.

                1 Reply Last reply
                0
                • J Joel Bodenmann
                  15 May 2016, 22:37

                  Well now it's actually working.
                  Thank you very much, I appreciate your help a lot!

                  Is there any way to tell windeployqt to only pick the DLLs from the MinGW distribution that came as part of the Qt installation? It seems to be a "pointless tool" otherwise (to exaggerate a bit).

                  T Offline
                  T Offline
                  tostrizek
                  wrote on 22 Oct 2020, 10:33 last edited by
                  #8

                  @Joel-Bodenmann Just an FYI for people that may stumble upon this topic. windeployqt picks the DLLs based on the PATH environment variable. That means putting $QT_INSTALL_DIR\Tools\mingw810_64\bin\ instead of C:\MinGW\bin will lead to windeployqt picking the DLLs that come with Qt. This approach requires removing the C:\MinGW\bin path from the environment variable. If you need to keep it there, maybe just put them both there and play with the order.

                  J 1 Reply Last reply 9 Aug 2021, 15:46
                  0
                  • T tostrizek
                    22 Oct 2020, 10:33

                    @Joel-Bodenmann Just an FYI for people that may stumble upon this topic. windeployqt picks the DLLs based on the PATH environment variable. That means putting $QT_INSTALL_DIR\Tools\mingw810_64\bin\ instead of C:\MinGW\bin will lead to windeployqt picking the DLLs that come with Qt. This approach requires removing the C:\MinGW\bin path from the environment variable. If you need to keep it there, maybe just put them both there and play with the order.

                    J Offline
                    J Offline
                    jerrylogansquare
                    wrote on 9 Aug 2021, 15:46 last edited by
                    #9

                    @tostrizek

                    Here's my shell script for setup in git bash (mingw)

                    #!/bin/bash
                    # use " source ./setup.sh  " to execute
                    export PATH=/c/Qt/5.15.2/mingw81_64/bin:$PATH
                    export PATH=/c/Qt/Tools/mingw810_64/bin:$PATH
                    export PATH=/c/Qt/Tools/QtInstallerFramework/4.1/bin:$PATH
                    
                    
                    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