14

My project works fine in previous versions of Xcode. Now I've updated to Xcode 4.6.2, and I'm getting this error:

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

Is this a bug in Xcode? How do I fix it?

alexwlchan
  • 5,699
  • 7
  • 38
  • 49
Nirav Jain
  • 5,088
  • 5
  • 40
  • 61

2 Answers2

23

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 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,

#rm -fr SharedPrecompiledHeaders

enter image description here

karim
  • 15,408
  • 7
  • 58
  • 96
19

Done i have closed xcode project then started again and CMD+SHIFT+K. This logic is working fine for me.

Parag Chauhan
  • 35,760
  • 13
  • 86
  • 95
Nirav Jain
  • 5,088
  • 5
  • 40
  • 61
  • I tried Clean Build Folder 10 times, never fixed it. Closed Xcode, started again, Cleaned Build Folder, then the build worked properly. Thanks! – Kenny Wyland May 28 '19 at 18:10