【发布时间】:2012-09-09 20:50:31
【问题描述】:
是否有一个预编译器指令可以检查框架是否链接到 Obj-C/Cocoa 项目中?
例如,我有一类有用的类别和一些 MapKit 类别。但是,如果 MapKit 未链接到框架,则这些类别将无法编译。
有没有类似的:
#ifdef MAPKIT
....
// Only compiles if MapKit framework is linked to the current project
....
#endif
【问题讨论】:
-
这没有意义。宏评估在链接阶段之前很久就完成了。
标签: iphone objective-c cocoa frameworks precompile