【发布时间】:2010-10-30 02:47:31
【问题描述】:
如何用预处理器指令语言编写以下内容?
if (isfullversion and isproduction)
else if (isliteversion)
end if
【问题讨论】:
标签: iphone objective-c xcode preprocessor-directive
如何用预处理器指令语言编写以下内容?
if (isfullversion and isproduction)
else if (isliteversion)
end if
【问题讨论】:
标签: iphone objective-c xcode preprocessor-directive
如果需要,您应该能够为预处理器编写已有的条件,而不仅仅是检查它们是否已定义。
#if (isfullversion && isproduction)
#elif (isliteversion)
#endif
【讨论】:
您创建单独的目标。一个用于精简版,一个用于完整版,然后添加编译器标志,如-DLITE,然后在您的代码中检查#ifdef LITE。
【讨论】:
LITE,那么#ifndef LITE 将是满的。