天天看点

gcc编译时传递宏定义

脚本中:

VERSION=3
gcc -DVERSION=${VERSION}      

代码中

#if (VERSION == 3)
 
#else
 
#endif      

继续阅读