MinGW Qt Application Deployment NOT WORKING
-
Before anything: yes, I have followed the guide: http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html
My platform target is windows.
My toolchain is mingw.
I am using Qt Creator.Here are the versions:
!http://i.imgur.com/zl1EqGc.png(p1)!
!http://i.imgur.com/5wOXN2J.png(p2)!Symptoms:
When I try deploying the application in its own folder with all the necessary DLL files, it seems to work on my dev machine. HOWEVER: on other machines I get these dialogs following a crash:
!http://i.imgur.com/AekqDQX.png(p3)!
!http://i.imgur.com/0rS3byj.png(p4)!What is weird to me is that on my dev machine, when I rename the Qt installation folder, "C:\Qt", to "C:\Qt2" or something, I get the same crash on my dev machine as well. Is there some strange dependency to the Qt installation folder that I have to modify or something that I don't know about? :(
Oh yeah, here's what my .pro file looks like:
@#-------------------------------------------------
Project created by QtCreator 2013-02-19T19:51:30
#-------------------------------------------------
QT += core gui network xml
greaterThan(QT_MAJOR_VERSION, 4): QT += multimedia widgets multimediawidgets
TARGET = MultimediaCaptionEditor
TEMPLATE = appSOURCES += ...
HEADERS += ...
@[edit, Picture links updated, koahnig]
-
welcome to devnet
I have updated your post's picture links. In this way the pictures are shown right away in your post making it easier to read. Please check out "this guide":http://qt-project.org/wiki/ForumHelp#b642e0c67b7a32cc0b833ea119693dce
Did you check with dependency walker outside of creator which dlls are loaded?
It looks a bit strange that a vc runtime dll is reported while you are using MinGW.
The Qt installation folder cannot be easily renamed. It is embedded in some of required executable. -
Thank you for updating my post. Yes, it is strange but I can assure you: I am using mingw32-make.exe in my build settings. So yes, I am in fact using mingw.
I tried looking at a dependency walker, but the problem is I do not understand how to interpret what it is telling me. This is a screen shot of appear to be the only two issues:
!http://i.imgur.com/ONdeq9X.png(dependency walker output)!
-
The dependency walker helps to understand what and from where the dlls are loaded. This might help you to ensure that the right version of dlls are loaded (compare folders). It happened to me that an old version of a Qt dll shipped with an installed application was loaded. That was quite an old version and caused a crash because of incompatibility. With Qt 5 this not be a problem yet.
You see two dlls which could not be loaded (see red error message on the right). In general that would be a problem. However, those two shown in your screen shot are also listed with my applications. But those are somehow exclusion of the general case they are not creating a problem. Do not ask why, I do not know ( and I do not bother :) .
The only way for you I see is that you are comparing the setup which works against the setup when it does not. Even so you are using MinGW there are at least one MS specific dll loaded. Possibly you have access through the environment path to an outdated version. However, that is crystal ball reading.
-
Hi SSJMetroid,
I have exactly the same Problem. I missing the GPSVC.DLL and IESHIMS.DLL to, but I also missing a DCOMP.DLL. I have still no Ideo how to fix it (learning to work with dependency walker for two days now). What I see is, that the linked QT5CORE.DLL has not the right Link Checksum (should be 0x00423D4A but is 0x00419Da7 or other way round, not sure). GPSVC.DLL and IESHIMS.DLL (and GPSVS.DLL) are both needed by the QT5CORE.DLL, so I guess this is the way to go.
Would be nice if you could post your checksum of QT5CORE.DLL, just for personal interest.
edit:
I guess I found the solution:
http://qt-project.org/forums/viewthread/26128/ -
Certainly the missing IESHIMS.dll is not an issue: it has never been present on any of my machines. I assume the other is not either.
All of the Qt Creator version information is very nice but not useful when it comes to your application. What version of Qt was your application built with? What compiler and version was your application built with? Exactly what files have you deployed?
-
Hi Chris. I am using a fresh install of whatever version of Qt Creator that was. This is my build environment:
!http://i.imgur.com/b31t527.png(build settings)!
As you can see, I am using Qt 5.0.1 to build the project. -
OK, so you have at least these files in your deployment:
@
yourapp.exeand the following from under C:\Qt\Qt5.0.1\mingw47_32\bin
Qt5Core5.dll
Qt5Gui.dll
Qt5Widgets.dll
Qt5Multimedia.dll
Qt5MultimediaWidgets.dll
Qt5Network.dll
Qt5OpenGL.dll
icudt49.dll
icuin49.dll
icuuc49.dll
libEGL.dll
libGLESv2.dll
D3DCompiler_43.dll
platforms\windows.dllthe following as required
imageformats*
mediaservice*The MingW runtime
MINGWM10.DLL
LIBGCC_S_sjlj-1.DLL
LIBSTDC++-6.dll
@ -
Thanks for your reply, Chris. I have located all of the files you specified already. I am guessing you tested this loadout to see if it works? A couple questions arise for me...
-
Some of the files you specified are named differently. Is this expected? For example: platforms\windows.dll is actually plugins\platforms\qwindows.dll on my end.
-
Should I be putting them into the same folder setup in my deployment? For example: putting plugins\imageformats* into the same directory as my exe file? Or just imageformats*? Or just copying all the DLL files and pasting them into the same directory as my exe file?
-
And most importantly: I have used all possible methods of searching my computer and have NOT LOCATED the file MINGWM10.DLL inside the C:\Qt folder (my installation directory for Qt). Is this just wrong? Is my installation bugged? Should I really be checking another directory for this? (I have previously installed a version of mingw on my computer located at C:\mingw, but this is more than likely a different version than the one that my deployment of Qt is using...)
-
-
I was able to fix the issue by providing ALL of the correct DLL files in all of the correct folder locations. Here is what my project directory looks like:
Main Folder:
imageformats folder
mediaservice folder
platforms folder
D3DCompiler_43.dll
icudt49.dll
icuin49.dll
icuuc49.dll
libEGL.dll
libgcc_s_sjlj-1.dll
libGLESv2.dll
libstdc++-6.dll
libwinpthread-1.dll
Qt5Core.dll
Qt5Gui.dll
Qt5Multimedia.dll
Qt5MultimediaWidgets.dll
Qt5Network.dll
Qt5OpenGL.dll
Qt5Widgets.dll
main.exeplatforms folder:
qwindows.dllmediaservice folder:
qsengine.dll
qtmedia_audioengine.dllimageformats folder:
qgif.dll
qico.dll
qjpeg.dll
qmng.dll
qsvg.dll
qtga.dll
qtiff.dll
qwbmp.dll -
ssjmetroid can u tell me how u got the correct folder locations. im having the same problem
-
[quote author="poketmonister" date="1397336037"]ssjmetroid can u tell me how u got the correct folder locations. im having the same problem
[/quote]Hi poketmonister, the correct locations are shown at http://qt-project.org/wiki/Deploy_an_Application_on_Windows -
thanks dude this had been bugging me for weeks....now it is done