【发布时间】:2011-11-28 12:10:47
【问题描述】:
我在 GlobalVar.h 和其他 .h 文件中定义了许多常量。我将这些文件导入到 Prefix.pch 文件中,如下所示:
//
// Prefix header for all source files of the 'XXX' target in the 'XXX' project
//
#import "GlobalVar.h"
[...]
#ifndef __IPHONE_3_0
#warning "This project uses features only available in iPhone SDK 3.0 and later."
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
#endif
但是当我编译项目时,所有#defined 标识符都丢失了,并报告为“使用未声明的标识符 XXX”。
我在 Build settings 中搜索,PCH 文件设置为“Prefix Header”...我在 Base SDK 4.3 和 XCode 4.0.2 上
你有调试这个的提示吗?
感谢您的帮助
【问题讨论】:
标签: ios compilation preprocessor