Hello, I have been having trouble the last few days trying to add the ArcGIS runtime SDK for Qt to a pre-existing project. I have read through the best practices and how to install on windows multiple times but nothing seems to be working. I am new to Qt/QML/etc so I am still learning how everything functions.
.pro file
#---ESRI Integration ---#
include ("C:\Program Files (x86)\ArcGIS SDKs\Qt100.8\sdk\ideintegration\arcgis_runtime_qml.pri")
QML2_IMPORT_PATH= "C:\Program Files (x86)\ArcGIS SDKs\Qt100.8\sdk\toolkit\Import"
QML2_IMPORT_PATH= "C:\Program Files (x86)\ArcGIS SDKs\Qt100.8\sdk\windows\x64\qml"
QML_IMPORT_PATH+= "C:\Program Files (x86)\ArcGIS SDKs\Qt100.8\sdk\toolkit\Import"
#---End ESRI Integration ---#
I have #include <QQmlEngine> added to my .cpp file as well.
The import Esri.ArcGISRuntime 100.8 statement in my .qml file does not throw an error but in the application output it says module "Esri.ArcGISRuntime" is not installed.
Solved! Go to Solution.
Hi Claire -
Regarding the 32-bit build, we only release the 64-bit binaries so I am not surprised you are getting a linker error.
As for 64-bit, we should be able to get this working. It sounds like an issue at runtime, not build time. I think there are a few ways this can be accomplished. First off, I believe QML2_IMPORT_PATH is supposed to be used as an environment variable (not qmake). You could try setting this environment variable in Qt Creator before running - https://doc.qt.io/qt-5/qtqml-syntax-imports.html#qml-import-path
Otherwise, have you tried adding to the import path in the main.cpp with engine.addImportPath?
https://doc.qt.io/qt-5/qqmlengine.html#addImportPath
QQmlApplicationEngine appEngine;
appEngine.addImportPath("C:\\Program Files (x86)\\ArcGIS SDKs\\Qt100.8\\sdk\\windows\\x64\\qml");
Hi Claire -
Regarding the 32-bit build, we only release the 64-bit binaries so I am not surprised you are getting a linker error.
As for 64-bit, we should be able to get this working. It sounds like an issue at runtime, not build time. I think there are a few ways this can be accomplished. First off, I believe QML2_IMPORT_PATH is supposed to be used as an environment variable (not qmake). You could try setting this environment variable in Qt Creator before running - https://doc.qt.io/qt-5/qtqml-syntax-imports.html#qml-import-path
Otherwise, have you tried adding to the import path in the main.cpp with engine.addImportPath?
https://doc.qt.io/qt-5/qqmlengine.html#addImportPath
QQmlApplicationEngine appEngine;
appEngine.addImportPath("C:\\Program Files (x86)\\ArcGIS SDKs\\Qt100.8\\sdk\\windows\\x64\\qml");
Hi Lucas Danzinger, thank you for your reply. I switched over to using a 64-bit compiler and the problem ended up being that I did not have it as an environment variable! Thank you for the information and help - I appreciate it.