更新后 XCode 4.6.2 问题。(错误:从不同分支构建的 PCH 文件)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16184304/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
XCode 4.6.2 issue after update. (error: PCH file built from a different branch )
提问by Nirav
My project works fine in previous versions of Xcode. Now I've updated to Xcode 4.6.2, and I'm getting this error:
我的项目在以前版本的 Xcode 中运行良好。现在我已更新到 Xcode 4.6.2,但出现此错误:
PCH file built from a different branch ((clang-425.0.27)) than the compiler ((clang-425.0.28))
从与编译器 ((clang-425.0.28)) 不同的分支 ((clang-425.0.27)) 构建的 PCH 文件
Is this a bug in Xcode? How do I fix it?
这是 Xcode 中的错误吗?我如何解决它?
回答by karim
Specially if you build from command line or you have a build script, cleaning xcode target is not enough. You have to delete this folder.
特别是如果你从命令行构建或者你有一个构建脚本,清理 xcode 目标是不够的。您必须删除此文件夹。
The precompiled header location can be found in the
预编译头文件的位置可以在
Target -> build settings => "Build locations" -> Precompiled headers cached path
Open Terminal
, cd
to the folder path and delete the folder with,
打开Terminal
,cd
到文件夹路径并删除文件夹,
#rm -fr SharedPrecompiledHeaders
回答by Nirav
Done i have closed xcode project then started again
and CMD+SHIFT+K
. This logic is working fine for me.
完成我有closed xcode project then started again
和CMD+SHIFT+K
。这个逻辑对我来说很好用。