I started a Qt project with only C++ code in it, everything worked fine at this point. Here are my configuration and the steps I'm following to deploy my executable :
Programming on Windows10 64bits, x64 processor, Lenovo Thinkpad Tablet. Using Qt5.9 framework and MinGW32bit compiler.
- (1) I first build the project and launch
windeployqt.exe
on a copy of my build directory. - (2) Then, I put every DLLs plus the executable into a Wix project to make a
MSI
package. As far as I know, the output of thisMSI
setup should do no more than just copying the files into theProgramFiles
directory, and adding the correct shortcuts to start menu and desktop.
At this point, everything always worked. But since a few days now, QML code was added to the project (therefore some OpenGL dependant plugins). I added a QQuickWidget
which instantiates a QML geographical Map object on my viewport. After I managed to get it to work on Windows, I am no more able to get a stand-alone * executable. Running it with Qt IDE works but, but running the stand-alone * executable does not. (Sorry if the terms are not correct: stand-alone with DLLs and lot of files dependancies)
When all the DLLs are copied into the executable folder, (step 1. above) the application get stuck in background, and shows nothing. Also there is no runtime error to debug it or to find out the missing DLLs, if there are.
My thoughts are that some QML plugins are not loaded, or something went wrong with OpenGLES and Angle, here are some of the DLLs I get as dependancies :
D3Dcompiler_47.dll
libEGL.dll
libgcc_s_dw2-1.dll
libGLESV2.dll
libstdc++-6.dll
opengl32sw.dll
Qt5Core.dll
Qt5Gui.dll
Qt5Network.dll
Qt5Positioning.dll
Qt5Qml.dll
Qt5Quick.dll
Qt5QuickWidgets.dll
Qt5SerialPort.dll
Qt5Svg.dll
Qt5Widgets.dll
at the same level of the executable.qwindows.dll
into a "platforms" folder, and some other folders such as "qmltooling", "position", "platforminputcontexts" ... (EDIT and seemingly the relevant QML plugins directories).
I don't know what it could be. Has anyone any idea ?
The output when setting the environment variable QML_IMPORT_TRACE to 1. The qt.network.ssl ...
messages are not part of the qml trace. I always got them since I added the QML map but it seems not to be a problem when running via Qt Creator.
QQmlImportDatabase::addImportPath: "C:/Qt/5.9/mingw53_32/qml"
QQmlImportDatabase::addImportPath: "qrc:/qt-project.org/imports"
QQmlImportDatabase::addImportPath: "C:/Users/hermes/Documents/build-MyApplication-Desktop_Qt_5_9_0_MinGW_32bit-Release/src/release"
QQmlImportDatabase::addImportPath: "C:/Qt/5.9/mingw53_32/qml"
QQmlImportDatabase::addImportPath: "qrc:/qt-project.org/imports"
QQmlImportDatabase::addImportPath: "C:/Users/hermes/Documents/build-MyApplication-Desktop_Qt_5_9_0_MinGW_32bit-Release/src/release"
QQmlImports(qrc:/qml.qrc/main.qml)::addLibraryImport: "QtQuick" 2.0 as ""
QQmlImports(qrc:/qml.qrc/main.qml)::importExtension: loaded "C:/Qt/5.9/mingw53_32/qml/QtQuick.2/qmldir"
QQmlImportDatabase::registerPluginTypes: "QtQuick" from "C:/Qt/5.9/mingw53_32/qml/QtQuick.2"
QQmlImports(qrc:/qml.qrc/main.qml)::addLibraryImport: "QtQuick.Controls" 1.4 as ""
QQmlImports(qrc:/qml.qrc/main.qml)::importExtension: loaded "C:/Qt/5.9/mingw53_32/qml/QtQuick/Controls/qmldir"
QQmlImportDatabase::registerPluginTypes: "QtQuick.Controls" from "C:/Qt/5.9/mingw53_32/qml/QtQuick/Controls"
QQmlImports(qrc:/qml.qrc/main.qml)::addLibraryImport: "QtLocation" 5.9 as ""
QQmlImports(qrc:/qml.qrc/main.qml)::importExtension: loaded "C:/Qt/5.9/mingw53_32/qml/QtLocation/qmldir"
QQmlImportDatabase::registerPluginTypes: "QtLocation" from "C:/Qt/5.9/mingw53_32/qml/QtLocation"
QQmlImports(qrc:/qml.qrc/main.qml)::addLibraryImport: "QtPositioning" 5.5 as ""
QQmlImports(qrc:/qml.qrc/main.qml)::importExtension: loaded "C:/Qt/5.9/mingw53_32/qml/QtPositioning/qmldir"
QQmlImportDatabase::registerPluginTypes: "QtPositioning" from "C:/Qt/5.9/mingw53_32/qml/QtPositioning"
QQmlImports(qrc:/qml.qrc/main.qml)::resolveType: "PluginParameter" => "QDeclarativeGeoServiceProviderParameter" TYPE
QQmlImports(qrc:/qml.qrc/main.qml)::resolveType: "MapQuickItem" => "QDeclarativeGeoMapQuickItem" TYPE
QQmlImports(qrc:/qml.qrc/main.qml)::resolveType: "Image" => "QQuickImage" TYPE
QQmlImports(qrc:/qml.qrc/main.qml)::resolveType: "Rotation" => "QQuickRotation" TYPE
QQmlImports(qrc:/qml.qrc/main.qml)::resolveType: "Map" => "QDeclarativeGeoMap" TYPE
QQmlImports(qrc:/qml.qrc/main.qml)::resolveType: "Plugin" => "QDeclarativeGeoServiceProvider" TYPE
QQmlImports(qrc:/qml.qrc/main.qml)::resolveType: "Connections" => "QQmlConnections" TYPE
QQmlImports(qrc:/qml.qrc/main.qml)::resolveType: "Component" => "QQmlComponent" TYPE
qt.network.ssl: QSslSocket: cannot resolve TLSv1_1_client_method
qt.network.ssl: QSslSocket: cannot resolve TLSv1_2_client_method
qt.network.ssl: QSslSocket: cannot resolve TLSv1_1_server_method
qt.network.ssl: QSslSocket: cannot resolve TLSv1_2_server_method
qt.network.ssl: QSslSocket: cannot resolve SSL_select_next_proto
qt.network.ssl: QSslSocket: cannot resolve SSL_CTX_set_next_proto_select_cb
qt.network.ssl: QSslSocket: cannot resolve SSL_get0_next_proto_negotiated
qt.network.ssl: QSslSocket: cannot resolve SSL_set_alpn_protos
qt.network.ssl: QSslSocket: cannot resolve SSL_CTX_set_alpn_select_cb
qt.network.ssl: QSslSocket: cannot resolve SSL_get0_alpn_selected
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_get0_next_proto_negotiated
mincore\com\oleaut32\dispatch\ups.cpp(2128)\OLEAUT32.dll!74865072: (caller: 7486FE4F) ReturnHr(1) tid(2e20) 8002801D Bibliothèque non inscrite.
mincore\com\oleaut32\dispatch\ups.cpp(2128)\OLEAUT32.dll!74865072: (caller: 7486FE4F) ReturnHr(2) tid(2e20) 8002801D Bibliothèque non inscrite.
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_get0_next_proto_negotiated
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_get0_next_proto_negotiated
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_get0_next_proto_negotiated
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_get0_next_proto_negotiated