Problem deploying exe on other computer
-
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! -
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!@Efstein said in Problem deploying exe on other computer:
After this, some dll-files where still missing
Which ones?
-
@Efstein said in Problem deploying exe on other computer:
After this, some dll-files where still missing
Which ones?
@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-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.
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 ?
-
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 ?
@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-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.@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
-
@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
-
@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.
@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 ? -
@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.
@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.
-
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!