宠__cplusplus,我都没有惹它。安装了CCS8.3.0后,这个宏就是已经定义了的。凡兼容C++和C的文件的定义就自动转为C++的定义了。(以前用的编译器没有这个现象)
昨天找到今天,还 是没有找到怎么设置它。
为了能正确编译,在build -> C2000 compiler -> predefined symbols -> Undefined name 中设置__cplusplus时,并不能使编译器按C格式编译。
只有在每个头文件(一个一个地加入以下语句)中使用:
#ifdef __cplusplus
#undef __cplusplus
#endif
才可以把__cplusplus定义去掉
这个问题怎么解决?麻烦帮忙!
谢谢大家
