以前一直手写

#ifdef __cplusplus
extern "C" {
#endif

 

现在发现 Linux 系统头文件都用  __BEGIN_DECLS  、 __END_DECLS

 

这个只需要 #include <sys/cdefs.h> 即可

 posted on 2015-04-26 07:55  加菲猫  阅读(603)  评论(0编辑  收藏  举报