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. How to deploy Qt app properly?
Forum Updated to NodeBB v4.3 + New Features

How to deploy Qt app properly?

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 4 Posters 676 Views 3 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.
  • EngelardE Offline
    EngelardE Offline
    Engelard
    wrote on last edited by
    #1

    My pc is x64, my Qt project is build on x32 MSVC. Everything compiles in release mode, deploys simply(1 time tried with --quick) with no side options, everything works well. At PC where i've build the app.

    But! When i bring that ready-to-use app to my other pc, which also x64 but windows 7, not 10, it rejects to run of course)

    And then errors leads me to the hours of wasting my time for downloading .dlls and put it manually one buy one in Apps folder. And no proper answer in google as well, or at least i'm just tired of seeking for those answers.

    The only help from Qt manual is app called Dependency Walker. Which was revelation to me, shows which libraries app using, awesome thing.

    And after adding "strange, new-kind" .dll, which my app was demanding(api-ms-win-crt-runtime-l1-1-0.dll), it stops. It stops asking for .dlls, and this time gave me new kind of error - 0xc000007b. After that i found Dependency Walker app which was mentioned above, which shows me what .dlls is missing:
    alt text
    Have no idea what will happen after i bring rest of those .dlls. Will find out tomorrow.

    I'd be grateful to any kind of suggestions, hints, or advices from the exerienced people about "How To Deploy Qt App Propeprly".

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

      Hi, Dependency Walker was an excellent tool 15 years ago, but it has not been updated since then and knows nothing the peculiarities of Windows 7 or Windows 10. For example, those .dlls that starts with "API-MS-WIN...", Dependency Walker flags them erroneously as "missing .dlls". but they are not real .dlls, just "shim files" that are part of Microsoft's refactoring effort.

      That error 0xc000007b occurs when you've manually copied .dlls from C:\Windows\System32 (which contains the 64-bit version of the .dlls) instead of copying them from C:\Windows\SysWOW64 (which contains the 32-bit version of the .dlls). Admittedly Microsoft could have named the directories better, like they did 20 years ago when the moved from C:\Windows\System to C:\Windows\System32 (i.e. from 16-bit .dlls to 32-bit .dlls).

      It's better to use Microsoft pre-packaged set of .dlls (the redistributable package) for x32 MSVC it's here. Just remember to run it on every computer you want to deploy your app to and you should be fine.

      EngelardE 1 Reply Last reply
      6
      • Chris KawaC Offline
        Chris KawaC Offline
        Chris Kawa
        Lifetime Qt Champion
        wrote on last edited by Chris Kawa
        #3

        There's a more modern rewrite of Dependency Walker called Dependencies. One of the benefits of it is that it understands the newer mechanisms of recent Windows versions, like those shim dlls.

        1 Reply Last reply
        4
        • hskoglundH hskoglund

          Hi, Dependency Walker was an excellent tool 15 years ago, but it has not been updated since then and knows nothing the peculiarities of Windows 7 or Windows 10. For example, those .dlls that starts with "API-MS-WIN...", Dependency Walker flags them erroneously as "missing .dlls". but they are not real .dlls, just "shim files" that are part of Microsoft's refactoring effort.

          That error 0xc000007b occurs when you've manually copied .dlls from C:\Windows\System32 (which contains the 64-bit version of the .dlls) instead of copying them from C:\Windows\SysWOW64 (which contains the 32-bit version of the .dlls). Admittedly Microsoft could have named the directories better, like they did 20 years ago when the moved from C:\Windows\System to C:\Windows\System32 (i.e. from 16-bit .dlls to 32-bit .dlls).

          It's better to use Microsoft pre-packaged set of .dlls (the redistributable package) for x32 MSVC it's here. Just remember to run it on every computer you want to deploy your app to and you should be fine.

          EngelardE Offline
          EngelardE Offline
          Engelard
          wrote on last edited by
          #4

          @hskoglund said in How to deploy Qt app properly?:

          for x32 MSVC it's here.

          HOLY!

          Whole that qt manual should be just this little single line.

          JKSHJ 1 Reply Last reply
          0
          • EngelardE Engelard

            @hskoglund said in How to deploy Qt app properly?:

            for x32 MSVC it's here.

            HOLY!

            Whole that qt manual should be just this little single line.

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

            @Engelard said in How to deploy Qt app properly?:

            @hskoglund said in How to deploy Qt app properly?:

            for x32 MSVC it's here.

            HOLY!

            Whole that qt manual should be just this little single line.

            It's in the Qt documentation at https://doc.qt.io/qt-5/windows-deployment.html

            "To install the runtime libraries on the end-user's system, you need to include the appropriate Visual C++ Redistributable Package (VCRedist) executable with your application and ensure that it is executed when the user installs your application.

            They are named vcredist_x64.exe (64-bit) or vcredist_x86.exe (32-bit) and can be found in the folder <Visual Studio install path>/VC/redist/<language-code>.

            Alternatively, they can be downloaded from the web, for example vcredist_x64.exe for Visual Studio 2015."

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

            EngelardE 1 Reply Last reply
            3
            • JKSHJ JKSH

              @Engelard said in How to deploy Qt app properly?:

              @hskoglund said in How to deploy Qt app properly?:

              for x32 MSVC it's here.

              HOLY!

              Whole that qt manual should be just this little single line.

              It's in the Qt documentation at https://doc.qt.io/qt-5/windows-deployment.html

              "To install the runtime libraries on the end-user's system, you need to include the appropriate Visual C++ Redistributable Package (VCRedist) executable with your application and ensure that it is executed when the user installs your application.

              They are named vcredist_x64.exe (64-bit) or vcredist_x86.exe (32-bit) and can be found in the folder <Visual Studio install path>/VC/redist/<language-code>.

              Alternatively, they can be downloaded from the web, for example vcredist_x64.exe for Visual Studio 2015."

              EngelardE Offline
              EngelardE Offline
              Engelard
              wrote on last edited by
              #6

              @JKSH said in How to deploy Qt app properly?:

              It's in the Qt documentation at https://doc.qt.io/qt-5/windows-deployment.html

              Yeah... my bad. I was in such a hurry so some lines i skipped)

              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