"Esri.ArcGISRuntime": Cannot load library in deployment exe

822
3
10-09-2022 08:43 PM
RenjithR
New Contributor

Hi,

I tried to integrate the ArcGIS ESRI runtime plugin with my application. I am using Qt 5.15.2 and Arcgis runtime version 100.8 with CMake build system and Compiler MSVC 2019 64bit. I successfully integrate the plugin with my application and works fine when I run the application using Qt Creator. 

After I generate the executable using windeployqt and run the executable it shows the following error

QQmlImports(qrc:/qml/esrimap.qml)::addLibraryImport: "QtQuick" 2.6 as ""
QQmlImports(qrc:/qml/esrimap.qml)::importExtension: loaded "D:/LocalRepo/ewGUI_Qt_5.15/deployment/packages/com.vendor.product/data/QtQuick.2/qmldir"
QQmlImports(qrc:/qml/esrimap.qml)::addLibraryImport: "QtQuick.Controls" 2.2 as ""
QQmlImports(qrc:/qml/esrimap.qml)::importExtension: loaded "D:/LocalRepo/ewGUI_Qt_5.15/deployment/packages/com.vendor.product/data/QtQuick/Controls.2/qmldir"
QQmlImportDatabase::registerPluginTypes: "QtQuick.Controls" from "D:/LocalRepo/ewGUI_Qt_5.15/deployment/packages/com.vendor.product/data/QtQuick/Controls.2"
QQmlImports(qrc:/qml/esrimap.qml)::addLibraryImport: "Esri.ArcGISRuntime" 100.8 as ""
QQmlImports(qrc:/qml/esrimap.qml)::importExtension: loaded "C:/Program Files (x86)/ArcGIS SDKs/Qt100.8/sdk/windows/x64/qml/Esri/ArcGISRuntime/qmldir"
qrc:/qml/esrimap.qml:3:1: plugin cannot be loaded for module "Esri.ArcGISRuntime": Cannot load library C:\Program Files (x86)\ArcGIS SDKs\Qt100.8\sdk\windows\x64\qml\Esri\ArcGISRuntime\ArcGISRuntimePlugin.dll: The specified module could not be found.
import Esri.ArcGISRuntime 100.8

But it works on the Qt Creator. The only difference I found is that the ArcGISRuntimePlugin.dll path has "\" instead of "/".How to override this path or How to solve the path issue/loading issue?

0 Kudos
3 Replies
AlessioWilliamsGava
Esri Contributor

I am sure you already visited, but I paste just in case qt 5 windeploy page.

Do you get anything different if you specifically add the flag

--qmldir "C:\Program Files (x86)\ArcGIS SDKs\Qt100.8\sdk\windows\x64\qml"

 to the windeploy command.
Otherwise you could try to manually copy the missing .dll into the local folder from where you are running windeploy, just to see if it runs fine with it.

0 Kudos
RenjithR
New Contributor

Thanks for your response.

I tried this also. The ArcGISRuntime plugin is there but the reference path didn't change and still, it looks for the same path for the DLLs. And it fails with the same error. 

0 Kudos
JamesBallard1
Esri Regular Contributor

Hi @RenjithR. We have run into issues in the past running Qt's deployment tool, primarily because in my experience it does not properly detect other dependencies besides Qt itself.

In your deployed application folder, you will need EsriCommonQt.dll, runtimecore.dll and ArcGISRuntimePlugin.dll.

Take a look at our QML samples deployment for a comparison. This is the 100.15.0 version, but you should be able to see where all the expected dlls are.

https://www.arcgis.com/home/item.html?id=c8f2bd986fd342ad933684db73dc4b69 

0 Kudos