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.exeon a copy of my build directory. - (2) Then, I put every DLLs plus the executable into a Wix project to make a
MSIpackage. As far as I know, the output of thisMSIsetup should do no more than just copying the files into theProgramFilesdirectory, 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.dlllibEGL.dlllibgcc_s_dw2-1.dlllibGLESV2.dlllibstdc++-6.dllopengl32sw.dllQt5Core.dllQt5Gui.dllQt5Network.dllQt5Positioning.dllQt5Qml.dllQt5Quick.dllQt5QuickWidgets.dllQt5SerialPort.dllQt5Svg.dllQt5Widgets.dllat the same level of the executable.qwindows.dllinto 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
