这个问题在过去几周内已经发展,以涵盖xcode4的更多一般性问题(以及从旧的xcode升级项目).
然而,许多问题可以通过遵循相同的指令集来解决.
如果您遇到以下任何问题,请尝试接受的答案中的方法:
标题: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.
Run Code Online (Sandbox Code Playgroud)
Xcode给出了错误
lexical or preprocessor issue file not found
Run Code Online (Sandbox Code Playgroud)
很多谷歌搜索显示很多人都有这个问题,但没有解决方案.任何人都得到了修复甚至线索.
更新:在user header搜索路径设置为${BUILT_PRODUCTS_DIR}所有配置.除了归档时,它使用任何配置构建良好.
更新2: Merchant.h …
compiler-construction objective-c clang xcode4 c-preprocessor