Procedure entry point not located when deploying Qt MinGW application
-
Hi all,
I started reading into how to deploy my Qt project yesterday. I went ahead and gave it all a shot using the windeployqt.exe. Moving all dependent dll's into the bin directory seemed to work fine using the tool, yet I am not able to run my .exe. The execution raises multiple errors of the following form:
IMHO, these seem to be linking errors, so I thought I had moved the wrong .dll files (e.g. MSVC built dll instead of MinGW) into my bin directory. But I verified that the windeployqt.exe I used was the one under the right Qt version and compiler. Still, it seems obvious I missed something, so let me take a step back and explain exactly what I did.
First, I built my project using the Desktop Qt 5.8.0 MinGW 32bit2 build kit (in Release mode).
Second, I am using shadow build, so I entered my release build directory under:
<project_dir>/../build-pap-media-qt-tool-Desktop_Qt_5_8_0_MinGW_32bit2-Release/releaseHere I deleted all contained files created by the build process, except for my .exe.
Then I ran:windeployqt.exe .
from the command line within given directory. To make sure I am using the right version of windeployqt.exe, I have extended my environment PATH variable to lookup windeployqt.exe from C:\Qt\5.8\mingw53_32\bin. windeployqt.exe was not a known command in my cmd before adding this line to PATH, so I am certain the one under the added PATH entry is the one that is being used.
Can someone tell me what is going wrong here?
Thanks!
-
@jsulm I adjusted my call to windeployqt.exe based on what you suggested:
C:\Qt\5.8\mingw53_32\bin\windeployqt.exe .
(I am calling this in my <project_name>-Desktop_qt_5_8_0_MinGW_32bit2-Release\release directory)
Now I am getting the following output:
Direct dependencies: Qt5Core Qt5Gui Qt5Multimedia Qt5Network Qt5Sql Qt5Widgets
All dependencies : Qt5Core Qt5Gui Qt5Multimedia Qt5Network Qt5Sql Qt5Widgets
To be deployed : Qt5Core Qt5Gui Qt5Multimedia Qt5Network Qt5Sql Qt5Widgets
Unable to find the platform plugin. -
@jsum copied over the qwindows.dll from plugins/platforms, windeployqt.exe added dependencies again. I ran my .exe and got
I went ahead and copied the .dll mentioned above from C:\Qt\5.8\mingw53_32\bin. After that I received a similar error for libwinpthread-1.dll. Copied it, too.
Now I am left with a bunch of procedure entry point errors, similar to what I had initially posted.
I noticed one warning in the windeployqt.exe output though. For completeness I'll post all output. The line I am referring to is highlighted bold:
Adding Qt5Svg for qsvgicon.dll
Skipping plugin qtvirtualkeyboardplugin.dll due to disabled dependencies.
Direct dependencies: Qt5Core Qt5Gui Qt5Multimedia Qt5Network Qt5Sql Qt5Widgets
All dependencies : Qt5Core Qt5Gui Qt5Multimedia Qt5Network Qt5Sql Qt5Widgets
To be deployed : Qt5Core Qt5Gui Qt5Multimedia Qt5Network Qt5Sql Qt5Svg Qt5Widgets
Warning: Cannot find GCC installation directory. g++.exe must be in the path.
Updating Qt5Core.dll.
Updating Qt5Gui.dll.
Updating Qt5Multimedia.dll.
Updating Qt5Network.dll.
Updating Qt5Sql.dll.
Updating Qt5Svg.dll.
Updating Qt5Widgets.dll.
Updating libGLESV2.dll.
Updating libEGL.dll.
Updating D3Dcompiler_47.dll.
Updating opengl32sw.dll.
Patching Qt5Core.dll...
Creating directory C:/Users/Basti/Documents/Code/pap-media/pap-media-qt-tool/build-pap-media-qt-tool-Desktop_Qt_5_8_0_MinGW_32bit2-Release/release/audio.
Updating qtaudio_windows.dll.
Creating directory C:/Users/Basti/Documents/Code/pap-media/pap-media-qt-tool/build-pap-media-qt-tool-Desktop_Qt_5_8_0_MinGW_32bit2-Release/release/bearer.
Updating qgenericbearer.dll.
Updating qnativewifibearer.dll.
Creating directory C:/Users/Basti/Documents/Code/pap-media/pap-media-qt-tool/build-pap-media-qt-tool-Desktop_Qt_5_8_0_MinGW_32bit2-Release/release/iconengines.
Updating qsvgicon.dll.
Creating directory C:/Users/Basti/Documents/Code/pap-media/pap-media-qt-tool/build-pap-media-qt-tool-Desktop_Qt_5_8_0_MinGW_32bit2-Release/release/imageformats.
Updating qgif.dll.
Updating qicns.dll.
Updating qico.dll.
Updating qjpeg.dll.
Updating qsvg.dll.
Updating qtga.dll.
Updating qtiff.dll.
Updating qwbmp.dll.
Updating qwebp.dll.
Creating directory C:/Users/Basti/Documents/Code/pap-media/pap-media-qt-tool/build-pap-media-qt-tool-Desktop_Qt_5_8_0_MinGW_32bit2-Release/release/mediaservice.
Updating dsengine.dll.
Updating qtmedia_audioengine.dll.
Creating directory C:/Users/Basti/Documents/Code/pap-media/pap-media-qt-tool/build-pap-media-qt-tool-Desktop_Qt_5_8_0_MinGW_32bit2-Release/release/platforms.
Updating qwindows.dll.
Creating directory C:/Users/Basti/Documents/Code/pap-media/pap-media-qt-tool/build-pap-media-qt-tool-Desktop_Qt_5_8_0_MinGW_32bit2-Release/release/playlistformats.
Updating qtmultimedia_m3u.dll.
Creating directory C:/Users/Basti/Documents/Code/pap-media/pap-media-qt-tool/build-pap-media-qt-tool-Desktop_Qt_5_8_0_MinGW_32bit2-Release/release/sqldrivers.
Updating qsqlite.dll.
Updating qsqlmysql.dll.
Updating qsqlodbc.dll.
Updating qsqlpsql.dll.
Creating C:\Users\Basti\Documents\Code\pap-media\pap-media-qt-tool\build-pap-media-qt-tool-Desktop_Qt_5_8_0_MinGW_32bit2-Release\release\translations...
Creating qt_ca.qm...
Creating qt_cs.qm...
Creating qt_de.qm...
Creating qt_en.qm...
Creating qt_fi.qm...
Creating qt_fr.qm...
Creating qt_he.qm...
Creating qt_hu.qm...
Creating qt_it.qm...
Creating qt_ja.qm...
Creating qt_ko.qm...
Creating qt_lv.qm...
Creating qt_pl.qm...
Creating qt_ru.qm...
Creating qt_sk.qm...
Creating qt_uk.qm... -
@Vagabond said in Procedure entry point not located when deploying Qt MinGW application:
Warning: Cannot find GCC installation directory. g++.exe must be in the path.
Try to add the directory containing g++.exe to PATH before calling windeployqt.exe (just do it in cmd.exe, not globally).