Error of the type unresolved external symbol

조회 수: 5 (최근 30일)
VINAYAK KARANDIKAR
VINAYAK KARANDIKAR 2019년 3월 28일
댓글: VINAYAK KARANDIKAR 2019년 5월 15일
Hello everyone,
so i am trying to compile a MEX program on MATLAB, which contains C++ files as well.
I now experience this error:
uhd_functions.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl uhd::msg::register_handler(void (__cdecl*const &)(enum uhd::msg::type_t,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &))" (__imp_?register_handler@msg@uhd@@YAXAEBQ6AXW4type_t@12@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z@Z) referenced in function "int __cdecl initUHD(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?initUHD@@YAHV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
I am unable to make the head or tail of this eeror, let alone resolve it.
Can someone help me out?
Thanks a lot,
Vinayak Anant Karandikar
  댓글 수: 4
Aliza Abdul Gani Shaikh
Aliza Abdul Gani Shaikh 2019년 5월 15일
Hello Vinayak,
I could generate the mex file using uhd 3.10.
I have come across the same error while using UHD 3.14 version as there is a lack of msg.hpp in 3.14.
which version of uhd lib have you used?
Warm Regards,
Aliza
VINAYAK KARANDIKAR
VINAYAK KARANDIKAR 2019년 5월 15일
Hello Aliza,
I had used UHD 3.10. It was suggested by Mr Lulf that i use a older version of UHD because the file msg.hpp in the older version supported the C++ language used in the codes i was trying to compile. I do not know what level of C++ your codes uses, it depends on that. Contact Mr Lulf for better replies: "https://www.nav.ei.tum.de/index.php?id=105"
Regards,
Vinayak Anant Karandikar

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Write C Functions Callable from MATLAB (MEX Files)에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by