c++在引用c语言的函数时,需要加上
//.h文件头部
#ifdef __cplusplus
extern "C" {
#endif
//<函数声明>
//.h文件尾部
#ifdef __cplusplus
}
#endif
否则在.cpp文件中直接include .h文件会出现”No such file or directory”的错误
c++在引用c语言的函数时,需要加上
//.h文件头部
#ifdef __cplusplus
extern "C" {
#endif
//<函数声明>
//.h文件尾部
#ifdef __cplusplus
}
#endif
否则在.cpp文件中直接include .h文件会出现”No such file or directory”的错误