LNK2019: unresolved external symbol __imp_runtime_create_session
Ältere Kommentare anzeigen
Hi Im trying to integrate MatlabCppSharedLib, I havent called any Matlab CPP API in the the code,
just the #include "MatlabCppSharedLib.hpp" and it throwing error
error LNK2019: unresolved external symbol __imp_runtime_create_session referenced in function "bool __cdecl `anonymous namespace'::init(class std::vector<class std::basic_string<char16_t,struct std::char_traits<char16_t>,class std::allocator<char16_t> >,class std::allocator<class std::basic_string<char16_t,struct std::char_traits<char16_t>,class std::allocator<char16_t> > > > const &)" (?init@?A0x1f98654b@@YA_NAEBV?$vector@V?$basic_string@_SU?$char_traits@_S@std@@V?$allocator@_S@2@@std@@V?$allocator@V?$basic_string@_SU?$char_traits@_S@std@@V?$allocator@_S@2@@std@@@2@@std@@@Z)
Have
- Added the lib folder path in Linker ->Input
- Copied libMatlabCppSharedLib.lib & libMatlabDataArray.lib & mclmcrrt.lib to the build folder
Kindly helpm thanks in advance
1 Kommentar
Jun Yang
am 8 Sep. 2022
Hi, I had a similar problem LNK2021 unresolved external symbol __imp_runtime_create_session.
I added: libMatlabCppSharedLib.lib, libMatlabDataArray.lib, mclmcrrt.lib, and my library specific *.lib generated by Matlab's application compiler to Linker | Input | Additional Dependencies (in a Microsoft VS 2017 c++ project). Rebuild it and there is no error any more.
Antworten (0)
Kategorien
Mehr zu Deploy to C++ Applications Using mwArray API (C++03) finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!