【发布时间】:2015-05-08 21:23:28
【问题描述】:
GCC 4.8.x - 4.9.x
你好,
我想在#ifdef 指令中合并多个宏,例如:
#ifdef PLOT || GRAPH
..mycode..
#endif
但它不起作用。
我怎样才能做到这一点?
这不是一个选项:
#ifdef PLOT
#ifdef GRAPH
..mycode..
#endif
#endif
因为如果定义了绘图而不是图形,则会丢失。
谢谢
【问题讨论】:
标签: c gcc macros conditional preprocessor-directive