为什么.mm文件不能识别.pch中的#define语句?
当尝试引用宏时,会导致“使用未声明的标识符”和“未在此范围内声明”。
Pch看起来像这样:
#import <Availability.h>
#ifndef __IPHONE_3_0
#warning "This project uses features only available in iPhone SDK 3.0 and later."
#endif
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#endif
#ifdef DEBUG
#define dNSLog(...) NSLog(@"%s %@", __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__])
#else
#define dNSLog(format, ...)
#endif
发布于 2011-04-29 16:37:18
我也有同样的问题,清洁并不能解决问题。
在关闭并重新启动Xcode4之后,一切正常。如果这能帮到某人的话。
发布于 2011-04-19 04:04:37
事实证明,Xcode4实际上并没有清理构建。:(
https://stackoverflow.com/questions/5683355
复制相似问题