我在我的项目中静态链接,并得到这些错误:fw.lib
C++/CLI
Error 1 error LNK2028: unresolved token (0A00001B) "extern "C" unsigned int __cdecl func(unsigned int,unsigned char *)" (?func@@$$J0YAIIPAE@Z) referenced in function "public: static void __clrcall Sdk::Native::Method(void)" (?Method@Native@Sdk@@$$FSMXXZ) C:\project\Sdk.obj Sdk
Error 2 error LNK2019: unresolved external symbol "extern "C" unsigned int __cdecl func(unsigned int,unsigned char *)" (?func@@$$J0YAIIPAE@Z) referenced in function "public: static void __clrcall Sdk::Native::Method(void)" (?Method@Native@Sdk@@$$FSMXXZ) C:\project\Sdk.obj Sdk
我做错了什么?我这样做了:
- 在[项目属性->库目录]中添加了lib路径
fw.lib
在 [项目属性 -> 附加依赖项] 下添加文件fw.h
用_extern "C" {...}
任何的想法 ?