Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何用预处理器指令语言编写以下内容?
if (isfullversion and isproduction) else if (isliteversion) end if
如果需要,您应该能够为预处理器编写已有的条件,而不仅仅是检查它们是否已定义。
#if (isfullversion && isproduction) #elif (isliteversion) #endif
您创建单独的目标。一个用于精简版,一个用于完整版,然后添加编译器标志,-DLITE然后签#ifdef LITE入您的代码。
-DLITE
#ifdef LITE