I hate it when a header file “has been modified since the precompiled header was built”

One of my favourite blog topics is poking fun at Xcode and all of the bizzare problems I encounter with it. The most recent one was a compiler error that looked like this:

fatal error: file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform
/Developer/SDKs/iPhoneSimulator6.0.sdk/usr/include/Availability.h' has been modified since the precompiled header was built

Strange, right? Fortunately, it was an easy fix – all I had to do was a Clean. After that, it compiled correctly.

What boggles my mind is that Xcode knew exactly what was wrong, but wasn’t smart enough to fix the problem itself. Maybe I am being unrealistic here, but it seems to me that a file included in the precompiled header has changed, the correct behavior would be to, you know, recompile the precompiled header?

Then again, it’s Xcode. So I guess not.

2 thoughts on “I hate it when a header file “has been modified since the precompiled header was built”

  1. It is very common problem if you are dealing with library development.I would suggest you to set “Precompile Prefix Header” to NO. For me nothing works except this.

  2. whoah this blog is wonderful i really like studying your articles.
    Stay up the good work! You know, lots of persons are looking around for
    this info, you can help them greatly.

    Review my site … home buying tips – Frederick
    -

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>