Windows QT Deployment not working (VS2010 + QT 5.4.0)
-
I have:
Windows 7 64bit
Visual Studio 2010
QT 5.4.0_MSVC2010OpenGL_32bit (opengl)When I run the release from QT-Creator, it’s successfully starting the Application. When deploying using windeployqt.exe it’s not working on any other machine, which has not installed QT.
[IMG]http://i60.tinypic.com/21jvcpy.png[/IMG]
Threads read so far and applied:
http://qt-project.org/forums/viewthread/25714/P15
http://qt-project.org/wiki/Deploy_an_Application_on_Windows
http://qt-project.org/forums/viewthread/21269Tested Solutions not working or partially:
1) Using windeployqt.exe
As suggested from Forum threads, I used windeployqt.exe for deploying, the commands I’ve used
a) First setting the environment variable for my QT version
@set PATH=C:\Qt\5.4\msvc2010_opengl\bin;%PATH%@b) Calling windeployqt.exe with path to my executable
@windeployqt.exe C:\build-AssetBrowserWidget-Desktop_Qt_5_4_0_MSVC2010_OpenGL_32bit-Debug\debug\AssetBrowserWidget.exe@Output of windeployqt.exe:
@Warning: Cannot find Visual Studio redistributable in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\redist@But I files are persistent in:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\redist\x64\Microsoft.VC100.CRT
a) msvcp100.dll, msvcr100.dllAnyhow this shouldn’t be the problem why the Application is not starting. (Go to Point 4 for the Reason)
2) I tried the naively copying copying all .dll files (those in Qt) into the root directory of my application
C:\Qt\5.4\msvc2010_opengl\bin
C:\Qt\5.4\msvc2010_opengl\pluginsI tried as well to copy the insides of plugins all *.dll to the root
This didn’t change anything
3) I tried to setting the library Path in my Code before the QApplication is started and this worked partially
a)
@ b<<".";
QApplication::setLibraryPaths(b);@This starts the Application, but obviously the plugins are not fully loaded, as the SQLite module isn’t working. The folders* sqldrivers, imageformats, iconengines,* are not touched, as i can remove them and nothing changes. The qwindow.dll which is under “paltforms” is seen by the application, when i remove the folder platforms, the application is starting and crashing immediately like before.
b)
I tried to set the Path to the plugin
@QApplication::addLibraryPath( QApplication::applicationDirPath() + QDir::separator() + "plugins");@4) Hiding System Files on developement machine
One more thing to mention, when i "hide" the* C:\Qt\5.4\msvc2010_opengl* folder then my application isn't starting on my development machine either, so i am sure, some files in this directory are missing.I am completely lost and i am really asking, why every other bit in Qt is smooth but the deployment process is obviously not out of the box.__
Here i am posting as well my Pro file:
@CONFIG +=c++11QT += core widgets gui multimedia designer sql
TARGET = AssetBrowserWidget
TEMPLATE = appSOURCES += main.cpp
widget.cpp
globals.cpp
Thumbnail.cpp
metadata.cpp
thumbcontainer.cppHEADERS += widget.h
globals.h
Thumbnail.h
metadata.h
thumbcontainer.hFORMS += widget.ui
RESOURCES += Style.qrc
RESOURCES +=
OTHER_FILES +=
@ -
Hi, agreed deployment of Qt apps can be troublesome, I think you need a complete list of the DLLs used by your app:
Start your app from Qt Creator, then try this utility: "ListDLLs":http://technet.microsoft.com/en-us/sysinternals/bb896656.aspxLaunch ListDLLs from a CMD window, e.g. "listdlls AssetBrowserWidget", then you'll see where the plugins are loaded from.
-
Hi and welcome to devnet,
Do you have any error message ?
Note that you are trying to deploy a debug build, you should first make it a release