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. Problem deploying exe on other computer
Forum Updated to NodeBB v4.3 + New Features

Problem deploying exe on other computer

Scheduled Pinned Locked Moved Solved Installation and Deployment
10 Posts 3 Posters 757 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
    Efstein
    wrote on last edited by
    #1

    Hey everbody!
    I have a problem deplyoing my Qt project. I used the MinGW-64bit-Kit in release-Mode and then windeployqt to the deploy it. The command I used was Path\to\Qt\5.15.2\mingw81_64\bin\windeployqt.exe path\to\deploymentFolder\Control.exe. After this, some dll-files where still missing, so I copied them to the deployment folder. The program then worked on my laptop and my home computer (where I have Qt 5.15.2 installed), but not on the computer where it should be used (here, Qt is not installed). When I click on the exe there, it simply loads for a few seconds, but does nothing after this and shows no error messages. Executing via console did not show any error messages neither.
    I already tried this guide, but it didn't help. I also checked if there are some files missing with this Dependency Walker, but there arent't any files missing. Do you have any suggestions what else I can try? Thanks for any hint in advance!

    Christian EhrlicherC 1 Reply Last reply
    0
    • E Efstein

      Hey everbody!
      I have a problem deplyoing my Qt project. I used the MinGW-64bit-Kit in release-Mode and then windeployqt to the deploy it. The command I used was Path\to\Qt\5.15.2\mingw81_64\bin\windeployqt.exe path\to\deploymentFolder\Control.exe. After this, some dll-files where still missing, so I copied them to the deployment folder. The program then worked on my laptop and my home computer (where I have Qt 5.15.2 installed), but not on the computer where it should be used (here, Qt is not installed). When I click on the exe there, it simply loads for a few seconds, but does nothing after this and shows no error messages. Executing via console did not show any error messages neither.
      I already tried this guide, but it didn't help. I also checked if there are some files missing with this Dependency Walker, but there arent't any files missing. Do you have any suggestions what else I can try? Thanks for any hint in advance!

      Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Efstein said in Problem deploying exe on other computer:

      After this, some dll-files where still missing

      Which ones?

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      E 1 Reply Last reply
      1
      • Christian EhrlicherC Christian Ehrlicher

        @Efstein said in Problem deploying exe on other computer:

        After this, some dll-files where still missing

        Which ones?

        E Offline
        E Offline
        Efstein
        wrote on last edited by
        #3

        @Christian-Ehrlicher Besides some of my own libraries, libgcc_s_seh-1.dll, msvcrt.dll, libwinpthread-1.dll, msvcp140_1.dll and vcruntime140_1d.dll were missing.

        J.HilkJ Christian EhrlicherC 2 Replies Last reply
        0
        • E Efstein

          @Christian-Ehrlicher Besides some of my own libraries, libgcc_s_seh-1.dll, msvcrt.dll, libwinpthread-1.dll, msvcp140_1.dll and vcruntime140_1d.dll were missing.

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by
          #4

          @Efstein

          these two statements

          I used the MinGW-64bit-Kit in release-Mode

          Besides some of my own libraries, libgcc_s_seh-1.dll, msvcrt.dll, libwinpthread-1.dll, msvcp140_1.dll and vcruntime140_1d.dll

          are contradictory. Those dlls are for MSVC builds and it seems like the target PC does not have the latest visual c++ distributable installed

          https://docs.microsoft.com/en-us/cpp/windows/redistributing-visual-cpp-files?view=msvc-170

          but does nothing after this and shows no error messages

          do, by any chance, you use QML in your app ?


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          E 1 Reply Last reply
          1
          • J.HilkJ J.Hilk

            @Efstein

            these two statements

            I used the MinGW-64bit-Kit in release-Mode

            Besides some of my own libraries, libgcc_s_seh-1.dll, msvcrt.dll, libwinpthread-1.dll, msvcp140_1.dll and vcruntime140_1d.dll

            are contradictory. Those dlls are for MSVC builds and it seems like the target PC does not have the latest visual c++ distributable installed

            https://docs.microsoft.com/en-us/cpp/windows/redistributing-visual-cpp-files?view=msvc-170

            but does nothing after this and shows no error messages

            do, by any chance, you use QML in your app ?

            E Offline
            E Offline
            Efstein
            wrote on last edited by
            #5

            @J-Hilk Ah yes sorry, I also tried the MSVC build and mixed it up... On the target computer, visual c++ redistributable 2015 is installed, this should work with Qt 5.15, shouldn't it?
            And no, I actually don't use QML in this app, only c++ and some resource files.

            J.HilkJ 1 Reply Last reply
            0
            • E Efstein

              @J-Hilk Ah yes sorry, I also tried the MSVC build and mixed it up... On the target computer, visual c++ redistributable 2015 is installed, this should work with Qt 5.15, shouldn't it?
              And no, I actually don't use QML in this app, only c++ and some resource files.

              J.HilkJ Offline
              J.HilkJ Offline
              J.Hilk
              Moderators
              wrote on last edited by
              #6

              @Efstein said in Problem deploying exe on other computer:

              visual c++ redistributable 2015 is installed, this should work with Qt 5.15, shouldn't it

              nope,

              thats the reason you don't get a missing msvcp140.dll missing error, but the others are from later versions.

              Update to the latest, it is backwards compatible


              Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


              Q: What's that?
              A: It's blue light.
              Q: What does it do?
              A: It turns blue.

              E 1 Reply Last reply
              1
              • J.HilkJ J.Hilk

                @Efstein said in Problem deploying exe on other computer:

                visual c++ redistributable 2015 is installed, this should work with Qt 5.15, shouldn't it

                nope,

                thats the reason you don't get a missing msvcp140.dll missing error, but the others are from later versions.

                Update to the latest, it is backwards compatible

                E Offline
                E Offline
                Efstein
                wrote on last edited by
                #7

                @J-Hilk We updated it to Microsoft Visual C++ 2015-2022 Redistributable, the same version that the app works with on my laptop, but it still doen't work on the target computer.

                J.HilkJ 1 Reply Last reply
                0
                • E Efstein

                  @J-Hilk We updated it to Microsoft Visual C++ 2015-2022 Redistributable, the same version that the app works with on my laptop, but it still doen't work on the target computer.

                  J.HilkJ Offline
                  J.HilkJ Offline
                  J.Hilk
                  Moderators
                  wrote on last edited by
                  #8

                  @Efstein well thats one thing down, what else do you get as an error message when you try to launch it?

                  can you launch it from the folder (not QtCreator) on your pc?
                  Did you use the correct windeployqt? each Qt version has its own deployment tool
                  Did you run the bat file from the qt installation folder to set up the environment for the deployment tool ?


                  Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                  Q: What's that?
                  A: It's blue light.
                  Q: What does it do?
                  A: It turns blue.

                  1 Reply Last reply
                  1
                  • E Efstein

                    @Christian-Ehrlicher Besides some of my own libraries, libgcc_s_seh-1.dll, msvcrt.dll, libwinpthread-1.dll, msvcp140_1.dll and vcruntime140_1d.dll were missing.

                    Christian EhrlicherC Online
                    Christian EhrlicherC Online
                    Christian Ehrlicher
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    @Efstein said in Problem deploying exe on other computer:

                    vcruntime140_1d.dll

                    This is wrong. You must not deploy Qt debug libraries to other computers.

                    Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                    Visit the Qt Academy at https://academy.qt.io/catalog

                    1 Reply Last reply
                    2
                    • E Offline
                      E Offline
                      Efstein
                      wrote on last edited by
                      #10

                      Ok, I added some debug-commands and a "CONFIG += console" to the .pro-file. With this, I found out that the app is actually starting, but crashes at some point. It seems like the problem is not my app, but the communication with a connected device (I was given the code for the communication from another project, so I just assumed it would work...). The only difference is that the other project is compiled with MingGW32 instead of MinGW64, so I'm gonna try this too, even if it is running on a 64 bit computer, this should work, right?

                      Anyway, thank you very much for your time and quick help! I think this is really the most helpful forum I know!

                      1 Reply Last reply
                      2

                      • Login

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