这个问题在过去几周内已经演变为涵盖 xcode4 的更一般问题。 (以及从旧的 xcode s 升级项目)。
但是,许多问题可以通过遵循相同的说明来解决。
如果您有以下任何问题,请尝试接受答案中的方法:
标题:Xcode 4 中的“词法或预处理器问题文件未找到”
我在 Xcode 4 中有一个项目,可以正常构建并在设备和模拟器上运行,但是在查找与静态库关联的头文件时尝试存档时出错:
In file included from /Volumes/Development/Path/LBProject/LBProject/LBProject-Prefix.pch:15:
In file included from /Volumes/Development/Path/LBProject/LBFDefines.h:23:
In file included from /Volumes/Development/Path/LBProject/Classes/LBProjectAppDelegate.h:11:
In file included from /Volumes/Development/Path/LBProject/LBProject/../FKNDirectory/FKNDirectoryManager.h:10:
/Volumes/Development/Path/LBProject/LBProject/../FKNDirectory/FKNDataModel.h:11:9: fatal error: 'Merchant.h' file not found [1]
#import "Merchant.h"
^
1 error generated.
Xcode 报错
lexical or preprocessor issue file not found
Much 谷歌搜索显示很多人都遇到了这个问题,但没有解决方案。任何人都得到了修复甚至线索。
更新:user header
搜索路径在所有配置中都设置为 ${BUILT_PRODUCTS_DIR}
。除了存档时,它使用任何配置都可以很好地构建。
更新 2: Merchant.h
是一个自动生成的核心数据类,因此在 .xcdatamodeld
包中,但是标题建库时都复制到public headers目录中。
最佳答案
NB: The steps below will solve 90% of your Xcode archive issues however, from the comments it is suggested you try quitting Xcode first. This may save you hours of setting tweaking.
$(LOCAL_APPS_DIR)
https://stackoverflow.com/questions/5584317/
相关文章:
objective-c - 按名称创建objective-c类实例?
iphone - 如何拦截点击 UITextView 中的链接?
objective-c - 如何在 Xcode 中定义预处理器符号
objective-c - 在Objective-C中将一个类的实例转换为@protocol
objective-c - ViewController 响应选择器 : message sent
objective-c - 如何使用 performSelector :withObject:aft