Deployment Problems Again
-
I posted of a deployment problem on 12-25-14 with Qt5.4 under Windows 8. With the help of hskoglund and SGaist I solved the problem but now I have updated to Qt5.14 under Windows 10 and the problems came back.
I used a simple widgets application named Qt_84 which I originally compiled and ran in the release version under Qt5.4 under Windows 8 and on another PC under Windows XP. It just displays a blank window with no code in the main.cpp file.
I created this folder for the application: C:\Qt\Apps. After compiling it in release mode I added the following files to this folder:
C:\Qt\Apps\build-Qt_84-Desktop_Qt_5_14_1_MinGW_32_bit-Release.
Qt5Core.dll Qt5Gui.dll QtWidgets.dll libgcc_s_dw2-1.dll libstdc++-6.dll libwinpthread-1.dll qwindows.dll
The first six files came from this folder: C:\Qt\minggw73_32\bin
The last file came from this folder: C:\Qt\migw73_32\plugins\platformsWhen I attempted to run Qt_84.exe I received this error:
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
I ran Dependency Walker which identified errors for QtCore.dll and QtWidgets.dll and many others for Kernel.dll, Shell32.dll, and Msvcrt.dll.
I placed windeployqt.exe in this folder: C:\Qt\Apps\build-Qt_84-Desktop_Qt_5_14_1_MinGW_32_bit-Release
and ran this command: windeployqt.exe Qt_84.exebut received this message:
Unable to query qmake: Create ProcessW failed: The system cannot find the file specified.
I have searched this forum and found may posts for this and similar problems and have learned a lot but not quite enough to solve the problem. I also followed a link here:
http://www.tripleboot.org/?p=138#more-138 which was very informative but am still in need of help. Any advice would be greatly appreciated.
-
Hi,
@QT_fan said in Deployment Problems Again:
I placed windeployqt.exe in this folder: C:\Qt\Apps\build-Qt_84-Desktop_Qt_5_14_1_MinGW_32_bit-Release
Don't do that. Use the full path to the windeployqt executable.
-
Thanks for the help. I made the change and it now runs outside of the IDE. However, it won't run on my PC with Windows XP. I receive this error:
The procedure entry point CancelOEx could not be located in the dynamic link library KERNEL32.dll. I thought that a release version would run on any PC with Windows. Not so?
-
Beside the fact that Windows XP has reached end of life a long time ago and Win7 just recently, the APIs made available by Windows have also evolved and new have been added. Qt just started to take advantage of them.
If you really want to support XP, you shall use an older version of Qt that has still that OS listed as officially supported.
-
@QT_fan said in Deployment Problems Again:
The procedure entry point CancelOEx could not be located in the dynamic link library KERNEL32.dll. I thought that a release version would run on any PC with Windows. Not so?
Not so.
The Windows XP version of kernel32.dll does not contain the
CancelIoEx()
function which was introduced in the Windows Vista version of kernel32.dll: https://docs.microsoft.com/en-us/windows/win32/fileio/cancelioex-funcAlso, see
- https://doc.qt.io/archives/qt-5.6/supported-platforms.html
- https://doc.qt.io/archives/qt-5.7/supported-platforms.html
Qt 5.6 officially supports deploying apps to Windows XP, but Qt 5.7 doesn't. @hskoglund reports that he was able to use Qt 5.7.1 on Windows XP, but that was simply a happy coincidence.
Qt 5.8 introduced changes that makes it incompatible with Windows XP: https://forum.qt.io/topic/78011/the-procedure-entry-point-cancelioex-could-not-be-located-in-the-dynamic-link-library-kernel32-dll/3
-
I downloaded Qt 5.4.2 from the archive and installed on my PC with Windows XP. This was the setup which I used in the past which worked fine. I created a test program and attempted to compile it in debug. The compile output looked like this:
02:11:06: Running steps for project Test...
02:11:06: Starting: "C:\Qt\Qt5.4.2\5.4\mingw491_32\bin\qmake.exe" C:\Qt\Qt5.4.2\Apps\Test\Test.pro -r -spec win32-g++ "CONFIG+=debug"02:11:07: The process "C:\Qt\Qt5.4.2\5.4\mingw491_32\bin\qmake.exe" exited normally.
02:11:07: Starting: "C:\Qt\Qt5.4.2\Tools\mingw491_32\bin\mingw32-make.exe"
C:\Qt\Qt5.4.2\5.4\mingw491_32\bin\qmake.exe -spec win32-g++ CONFIG+=debug -o Makefile ..\Test\Test.pro
The last line then repeated indefinitely. I haven't seen this before. What does it mean?
-
IIRC, this can happen when there's a date-time issue between the files and your machine.
Touch them all once so their modification time gets updated to the current time of your machine.