程序设计:c_plus_plus:error_lnk2001:unresolved_external_symbol_cdecl

error LNK2001: unresolved external symbol "*******__cdecl****"

这种连接错误是在C++文件里调用C程序导致的,解决方法是:

In the header file for C files (ANSI C), add the following prior to and after function prototypes

#ifdef __cplusplus 
extern "C"
{
#endif
//////////////////////

code.....

/////////////////////
#ifdef __cplusplus
}
#endif
  • 程序设计/c_plus_plus/error_lnk2001/unresolved_external_symbol_cdecl.txt
  • 最后更改: 2013/04/08 17:44
  • wuqi