打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
#ifdef

#ifdef __cplusplus是什么意思?
 
Microsoft-Specific Predefined Macros

__cplusplus Defined for C++ programs only.

意思是说,如果是C++程序,就使用
extern "C"{
而这个东东,是指在下面的函数不使用的C++的名字修饰,而是用C的

The following code shows a header file which can be used by C and C++ client applications:
// MyCFuncs.h
#ifdef __cplusplus
extern "C" { // only need to export C interface if
// used by C++ source code
#endif

__declspec( dllimport ) void MyCFunc();
__declspec( dllimport ) void AnotherCFunc();

#ifdef __cplusplus
}
#endif

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
extern “C”和
长见识:你真的知道C语言里extern 'C' 的作用吗?
#ifdef _cplusplus
FORTRAN/C/C++混合编程de总结
C 和 C++ 混合编程
用c语言写动态库
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服