在编译时不包含Prefix.pch [英] Prefix.pch not included at compilation time
问题描述
我在GlobalVar.h和其他.h文件中定义了许多常量.我将这些文件导入到Prefix.pch文件中,如下所示:
I have defined many constants in GlobalVar.h and other .h files. I import these files in the Prefix.pch file like this :
//
// 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".
But when I compile the project all the #defined identifiers are missing and reported as "Use of undeclared identifier XXX".
我在Build设置中进行了搜索,并将PCH文件设置为"Prefix Header" ...我在Base SDK 4.3和XCode 4.0.2上
I searched in the Build settings and the PCH file is set as "Prefix Header"... I am on Base SDK 4.3 and XCode 4.0.2
您是否有调试建议?
感谢您的帮助
推荐答案
在清理 DerivedData
并重新启动Xcode之后,我仍然遇到此错误.希望能对您有所帮助.
I came across this error yet, after cleaning DerivedData
and restart Xcode I fix it. Hope to help.
这篇关于在编译时不包含Prefix.pch的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!