Info error: PCH file built from a different branch than the compiler

Totally new to Unreal Engine programming so am a little lost - I’m sure I’m just missing something basic.

This is what I did…

  • Created a 2d Side Scroller Code Project.
  • Created an Actor in the project with “Add Code To Project”
  • In Xcode, added some basic code to the actor to make it move up and down (based off UE4 Quickstart Guide).
  • Built the project in Xcode.
  • Hit compile in the unreal editor and got an error message (below).

The actor isn’t showing up in my C++ Classes folder and I have literally no idea what to do. Been googling and searching on problems and can’t find anyone explaining this to a new coder like me.

Info UBT execution time: 2.51 seconds
Info Running Mono...
Info Setting up Mono
Info /Users/Shared/UnrealEngine/4.7/Engine /Users/Shared/UnrealEngine/4.7/Engine/Binaries/Mac
Info Compiling with Mac SDK 10.10
Info Performing 4 actions (8 in parallel)
Info [3/4] Compile ActorTest.cpp
Info [1/4] Compile ConstructionSetCharacter.cpp
Info [2/4] Compile ConstructionSet.generated.cpp
Info error: PCH file built from a different branch ((clang-600.0.56)) than the compiler ((clang-600.0.57))
Info 1 error generated.
Info error: PCH file built from a different branch ((clang-600.0.56)) than the compiler ((clang-600.0.57))
Info 1 error generated.
Info error: PCH file built from a different branch ((clang-600.0.56)) than the compiler ((clang-600.0.57))
Info 1 error generated.
Info -------- End Detailed Actions Stats -----------------------------------------------------------
Info ERROR: UBT ERROR: Failed to produce item: /Users/russellstephens/Documents/Unreal Projects/ConstructionSet/Binaries/Mac/UE4Editor-ConstructionSet-5548.dylib
Info Cumulative action seconds (8 processors): 0.00 building projects, 0.39 compiling, 0.00 creating app bundles, 0.00 generating debug info, 0.00 linking, 0.00 other

By the way, I’ve tried cleaning the project, cleaning up header files, restarting Xcode, etc to get this working but nothing seems to work… I’m sure I’m just missing something simple that a new UE4 coder like me just doesn’t know. Let me know if I need to provide any more information.

Looks like you updated Xcode, but you still have precompiled headers compiled with older version. It’s odd that cleaning the project didn’t solve this. Could you try deleting Intermediate folder in your project folder, please?

Where is the Intermediate folder?

I had the same error today after an update to Xcode. I did as he suggested to you and it corrected it for me. The path on my mac is ~/Documents/Unreal Projects/PROJECTNAME/Intermediate, I moved this folder to trash, opened the editor, compiled and it had corrected the problem.

I had also started XCode and allowed the completion of the installation that apparently would not occur until the first time XCode was started standalone. Starting just the unreal editor and compiling did not permit that finalization of the new XCode to complete.

This didn’t work for me - couldn’t even find the Intermediate folder - good to hear that it works in some cases though.

I just ended up starting a new project.

I made the mistake of using greater than and less than to denote the project name. So the path as I meant it to be should have been ~Documents/Unreal Projects/PROJECTNAME/Intermediate. With 4.6, all of my projects have that folder (though I presume only those that had reached a compile stage).

In another response to the same question I found on the net, there was another compile transient folder someone had suggested could also cause this. It was ~/Library/Developer/Xcode/DerivedData/PROJECTNAMEuniqueid. I deleted that one too but it didn’t correct this problem, so I’m not sure it was related.

That worked perfectly, thanks for following up. Will hopefully help others who visit this page too.

I think the thanks goes to Michael Trepka STAFF, I just added specificity. I like that UE staff are watching these questions.