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!