窗口7
项目框架: c ++ / CLR VS 2017
问题:我已成功将静态库链接到我的项目中。所以我没有得到任何与此相关的编译错误。我也在cpp文件中添加了它的头文件。
但是,当我尝试从静态库调用函数时,编译器会对此抱怨。
我想知道,我错过了什么吗?
仅需注意:我试图链接静态库并在win32下的虚拟项目构建中调用它的函数,并且编译得很好,所以问题与C ++ / CLR有关。
Employee.obj : error LNK2028: unresolved token (0A000519) "extern "C" void __cdecl convertPensionToInvest(long,char,double,double,double *,double *,double *)" (?convertPensionToInvest@@$$J0YAXJDNNPEAN00@Z) referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Employee::convertRanAzEleToHtLatLon(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)" (?convertRanAzEleToHtLatLon@Employee@@$$FQEAA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAV23@00@Z)
1>Employee.obj : error LNK2019: unresolved external symbol "extern "C" void __cdecl convertPensionToInvest(long,char,double,double,double *,double *,double *)" (?convertPensionToInvest@@$$J0YAXJDNNPEAN00@Z) referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Employee::convertRanAzEleToHtLatLon(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)" (?convertRanAzEleToHtLatLon@Employee@@$$FQEAA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAV23@00@Z)