Can't correctly deploy application (missing dlls?)
-
Hello,
I'm trying to deploy my application following this guide "http://qt-project.org/doc/qt-4.8/deployment-windows.html":http://qt-project.org/doc/qt-4.8/deployment-windows.html. I profiled the release executable using Dependency Walker and the only dependencies I seem to be missing are a few API-MS-WIN-CORE ones, DCOMP, GPSVC, and IESHIMS which would be expected from what I understand, but I am crashing when QTCORE4.DLL tries to dynamically load the WINTAB32.dll from the location 'C:\Windows\system32\wintab32.dll'. I checked and my computer does not have this file anywhere. I created a batch file that sets my path to the same that Qt is using when running my app, and then run dependency on the executable. What else could I be missing? -
welcome to devnet
Which compiler are you using?
You are listing only system dlls. For Mingw compiler for instance you need to include also some compiler specific dlls. -
I'm using mingw but I think the dlls are being found correctly, although one seems to be coming from the Qt directory and one from the mingw one. Here's a link to the crash as shown in Dependency Walker "http://postimg.org/image/gx3gm3e1x/":http://postimg.org/image/gx3gm3e1x/.
-
Did you check out from where the Qt dlls were loaded?
In case of different versions of Qt libs, they might get mixed. The combination of wintab32.dll and QtCore4.dll seem to create the issue. wintab32.dll can be found on internet and downloaded.
However, make sure that the current version is not lost.One of the MinGW dlls is loaded from Qt bin folder while the other is found in the compiler part. That could be also a problem.
-
The Qt dlls are loaded from C:\Qt\4.8.4\bin. If my path is the same as the one Qt is using, why am I having issues only when running outside of Qt? Is there something Qt is doing behind the scenes that I'm not aware of, like maybe should I also use all the environment variables Qt sets up?
-
[quote author="mpellegr" date="1370631532"]The Qt dlls are loaded from C:\Qt\4.8.4\bin. If my path is the same as the one Qt is using, why am I having issues only when running outside of Qt? Is there something Qt is doing behind the scenes that I'm not aware of, like maybe should I also use all the environment variables Qt sets up?[/quote]
I am not aware of anything special. At least I am not using special environment settings. When checking the dlls for my apps, I am killing deliberately the path environment setting in a command line box. Copying all dlls into the folder with the application ensures that I have all together before shipping somewhere else.
As noted above a bit strange is the different locations of the MinGW dlls libgcc*.dll and libstdc*.dll. I would choose them both from the mingw bin folder.
-
I've tried using both the libstdc and libgcc from my mingw directory, but the same crash happened. I'm actually not sure exactly which dll's are supposed to be used, that's why I'm looking at Qt's path to test which dll's I need to copy into the executable directory.
-
I have just checked. wintab32.dll is not a normal windows dll. At least it is not on windows 7 64 bit available. It is apparently part of a tablet distro.
Which version of windows do you have? And on what is it installed? -
I also have windows 7 64 bit and it's on a Dell Optiplex 790. Also, what did you mean by kill the path environment setting? Maybe I should try that.
-
I finally figured it out! Apparently Qt runs the executable from its parent directory. Whereas I was double clicking the executable to run. This made my runtime path different than when run from Qt, and since I was using relative addressing I was looking in the wrong place. So I just created a batch file in the parent that will run the executable. Hope this helps other people!
-
Thanks for notice. Good to know that you have solved your problem.
By killing the path I meant overwriting the "path" environment setting with "blank". This ensures that the application will not find any obscure Qt dll somewhere. Typically every application is extending the path environment setting. I have had occasions with an old Qt dll loaded from another rarely used application.