Windows QT Deployment not working (VS2010 + QT 5.4.0)
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.
Threads read so far and applied:
Tested 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
b) Calling windeployqt.exe with path to my executable
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.dll
Anyhow 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
I 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
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.
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:
QT += core widgets gui multimedia designer sql
TARGET = AssetBrowserWidget
TEMPLATE = app
SOURCES += main.cpp
HEADERS += widget.h
FORMS += widget.ui
RESOURCES += Style.qrc
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.aspx
Launch 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
@hskoglund i will give that a try tomorrow
@SGaist the error message is somehow gone, i had it as an image, but it was something like "runtime error" without much informaiton. Furthermore i tested it both with Release and Debug.