I am upgrading a Qt application from Qt 5.15 and Esri Maps SDK 100.15 to Qt 6.4 and Esri SDK 200.1, but now I am having trouble deploying it in Windows. When I double-click the exe in the 'deployment' folder to run it, there is a quick flicker and then nothing. The app closes immediately. I have also tried building and deploying a simple Esri Qt Quick QML application, built from one of the templates that comes with the SDK, and I get the same error.
I added plugin debugging ( qputenv("QT_DEBUG_PLUGINS", "1")) and some logging to this test application to troubleshoot, and it shows an error when trying to load the ArcGISRuntimePlugin.dll (it is looking for it in the sdk install directory, not in the application directory):
qt.core.library: "C:/Program Files/ArcGIS SDKs/Qt200.1.0/sdk/windows/x64/qml/Esri/ArcGISRuntime/ArcGISRuntimePlugin.dll" cannot load: Cannot load library C:\Program Files\ArcGIS SDKs\Qt200.1.0\sdk\windows\x64\qml\Esri\ArcGISRuntime\ArcGISRuntimePlugin.dll: The specified module could not be found.
qt.core.plugin.loader: QLibraryPrivate::loadPlugin failed on "C:/Program Files/ArcGIS SDKs/Qt200.1.0/sdk/windows/x64/qml/Esri/ArcGISRuntime/ArcGISRuntimePlugin.dll" : "Cannot load library C:\\Program Files\\ArcGIS SDKs\\Qt200.1.0\\sdk\\windows\\x64\\qml\\Esri\\ArcGISRuntime\\ArcGISRuntimePlugin.dll: The specified module could not be found."
qt.core.plugin.loader: Found metadata in lib C:/TEMP/troubleshooting/testMap_200_1_build_Qt652/qml/Esri/ArcGISRuntime/ArcGISRuntimePlugin.dll
Here are the steps that I am following (I also tried running this process in Qt 6.2.9, which is what these steps are from):
- Run qmake and build application in Qt Creator (the app does run from within Qt Creator without a problem).
- Create a new folder, C:\TEMP\troubleshooting\testMap_200_1_deploy_Qt62, and copy the exe to this folder. I also manually copy the following files/folders to this folder:
- qml folder from the Esri SDK installation; this has the ArcGISRuntime and ArcGISExtras plugins.
- EsriCommonQt.dll
- Msvcp140.dll
- Vcruntime140.dll
- Libcrypto-3-x64.dll
- Libssl-3-x64.dll
- Run windeployqt :
C:\Qt\Qt6.2.9\6.2.9\msvc2019_64\bin\windeployqt.exe --core --opengl --sensors --positioning --widgets --quick --network --multimedia --qmldir C:\TEMP\troubleshooting\testMap_200_1\qml --release C:\TEMP\troubleshooting\testMap_200_1_deploy_Qt62 > C:\TEMP\troubleshooting\testMap_200_1_deploy_Qt62\packlog.txt
When I run a similar process with Qt 5.15 and Esri SDK 100.15, it works fine.
I have tried several things to troubleshoot, including:
- Copying the ArcGISRuntimePlugin.dll to different locations within my deployment folder
- Adding an import path to a ‘relative’ copy of the runtime plugin (i.e referencing it via the applicationDirPath)
- Running this in Qt 6.2.9 instead of 6.4.3.
- And more.
Any suggestions on what I am missing in this process?
Thanks.