This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS 8.3.0 怎么去掉__cplusplus定义?



宠__cplusplus,我都没有惹它。安装了CCS8.3.0后,这个宏就是已经定义了的。凡兼容C++和C的文件的定义就自动转为C++的定义了。(以前用的编译器没有这个现象)

昨天找到今天,还 是没有找到怎么设置它。

为了能正确编译,在build -> C2000 compiler -> predefined symbols  -> Undefined name 中设置__cplusplus时,并不能使编译器按C格式编译。

只有在每个头文件(一个一个地加入以下语句)中使用:

#ifdef __cplusplus
#undef __cplusplus
#endif

才可以把__cplusplus定义去掉

这个问题怎么解决?麻烦帮忙!

谢谢大家