VC++工程中使用C文件

来源:互联网 发布:软考程序员教程 编辑:程序博客网 时间:2024/05/22 08:28

C头文件中:

#ifdef __cplusplus
extern "C" {
#endif

// ...

#ifdef __cplusplus
}  /* end of the 'extern "C"' block */
#endif


/*************************************************************/

C++ cpp文件中引用C的头文件

extern "C"
{
#include "sqlite3.h"
}

/*************************************************************/

属性::配置属性::C/C++::预编译头::选择"不使用预编译头"

0 0
原创粉丝点击