Hi,
We are facing with an issue with dylibs linking for a specific API, after upgrading Qt version from 5.12.5 to 5.15.1, using C++17 on Mac OS X Catalina 10.15.6.
Whenever we try to build our app we are getting this linker error:
Undefined symbols for architecture x86_64: "InferenceEngine::Core::LoadNetwork(InferenceEngine::CNNNetwork const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > const&)", referenced from: |
We are invoking the above API in a static library as follows:
try { const std::string devicename = "CPU"; std::map<std::string, std::string> config = {{ InferenceEngine::PluginConfigParams::KEY_PERF_COUNT, InferenceEngine::PluginConfigParams::YES }}; m_executableNetwork = m_core.LoadNetwork(m_network, devicename, config); } catch(details::InferenceEngineException &err) { std::cout<<"OpenVino Inference Engine LoadNetwork Exception: "<<err.what();
} |
We have tried with both the overloaded methods of LoadNetwork() API, but no luck, we get the same linker error every time.
We are linking to OpenVINO libs as follows in Qt PRO file:
QMAKE_CXXFLAGS += -D__STDC_CONSTANT_MACROS DEFINES -= UNICODE CONFIG += file_copies OPENVINO_LIB_LOCATION = $$PWD/libraries/thirdparty/openvino-2020_3_194 INCLUDEPATH += $$OPENVINO_LIB_LOCATION/include/openvino INCLUDEPATH += $$OPENVINO_LIB_LOCATION/include/ngraph INCLUDEPATH += $$OPENVINO_LIB_LOCATION/include/tbb INCLUDEPATH += $$OPENVINO_LIB_LOCATION/include/opencv INCLUDEPATH += $$OPENVINO_LIB_LOCATION/include/others INCLUDEPATH += $$OPENVINO_LIB_LOCATION/include/others/format_reader INCLUDEPATH += $$OPENVINO_LIB_LOCATION/include/others/gflags macx { CONFIG(debug,debug|release) { LIBS += -L$$OPENVINO_LIB_LOCATION/$$TARGET_PLATFORM/debug/openvino \ -linference_engined \ -linference_engine_c_apid \ -linference_engine_legacyd \ -linference_engine_lp_transformationsd \ -linference_engine_nn_builderd \ -linference_engine_preprocd \ -linference_engine_transformationsd \ -lMKLDNNPlugind \ -lmyriadPlugind LIBS += -L$$OPENVINO_LIB_LOCATION/$$TARGET_PLATFORM/debug/tbb \ -ltbb_debug \ -ltbbmalloc_debug \ LIBS += -L$$OPENVINO_LIB_LOCATION/$$TARGET_PLATFORM/debug/ngraph \ -lngraphd
} # end of macx openvino debug config block |
C++ version used here is C++17.
If we use the deprecated
InferenceEngine::InferencePlugin
Class for 'LoadNetwork', we do not observe any linker error.
Other API’s are not causing any issue, only we observe issue when we invoke this API.
Please find the Sample app attached using which we are able to reproduce the issue.
Note that Input image, Model, OpenVINO dependencies need to be copied to the sample app, to see this in action.
Link Copied
Here are more findings and details:
WIth both the above settings we are observing the same issue with test application.
Greetings,
It is recommended for you to use the latest OpenVINO version.
Most problems that came when integrating OpenVINO with QT solved previously by migrating to the latest version.
Sincerely,
Iffa
Greetings,
Intel will no longer monitor this thread since we have provided a solution. If you need any additional information from Intel, please submit a new question.
Sincerely,
Iffa
For more complete information about compiler optimizations, see our Optimization Notice.