LNK2019: unresolved external symbol __imp_runtime_create_session
显示 更早的评论
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 个评论
Jun Yang
2022-9-8
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.
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Deploy to C++ Applications Using mwArray API (C++03) 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!