Xcode version 4.6.2 (4H1003) compiler error

2019-01-21 21:28发布

I just updated to Xcode version 4.6.2 (4H10003) and tried to run a previously working application project in the simulator and received the following error and the build failed.

PCH file built from a different branch ((clang-425.0.27)) than the compiler ((clang-425.0.28))

What went wrong and how can it be fixed?

9条回答
家丑人穷心不美
2楼-- · 2019-01-21 21:42

I had to manually delete ~/Library/Developer/Xcode/DerivedData/ Clean didn't work for me.

查看更多
smile是对你的礼貌
3楼-- · 2019-01-21 21:44

Do a Clean of the project; hold Option so that you are cleaning out the whole build folder and intermediates. You might have to quit Xcode and throw away the whole contents of the DerivedData folder by hand in the Finder, as I describe here: How to Empty Caches and Clean All Targets Xcode 4

查看更多
狗以群分
4楼-- · 2019-01-21 21:46

Go to your project's Build Settings, find a setting named Precompiled Headers Cache Path, then delete that folder

查看更多
Explosion°爆炸
5楼-- · 2019-01-21 21:46

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.

The exact location of precompiled header can be found in the project, part of the folder path is random (I guess), esp after /var/folders/xx..xxx/C.

Target -> build settings => "Build locations" -> Precompiled headers cached path

Run Terminal and go to this folder and delete (use command),

#rm -fr SharedPrecompiledHeaders

enter image description here

查看更多
别忘想泡老子
6楼-- · 2019-01-21 21:47

Do a cleanup using command+shift+k and run existing project again.

enter image description here

查看更多
Viruses.
7楼-- · 2019-01-21 21:53

Clean Your project and run

Product- > Clean Then, Run.

查看更多
登录 后发表回答