【问题标题】:Cocoa preprocessor exit fileCocoa 预处理器退出文件
【发布时间】:2013-04-30 13:02:55
【问题描述】:

我见过一些编译器可以让你在你想要的文件中停止读取文件 我想知道obj-​​c有没有这样的东西,这里举个例子,大家可以理解:

#ifndef __OBJC__   // or #if !defined(__OBJC__)
#exit  // do not continue compiling this file!
#endif

【问题讨论】:

    标签: objective-c cocoa c-preprocessor exit


    【解决方案1】:

    不,您不能简单地在文件中间停止编译。您必须以这种方式构建它:

    #if __OBJC__
    // the rest of the file
    #endif
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-07-13
      • 1970-01-01
      • 1970-01-01
      • 2019-06-22
      • 2011-04-14
      相关资源
      最近更新 更多