Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 4.1 fatal error: stdlib modified since the precompiled header was built

Building an iPhone app, using:

  • Xcode 4.1
  • Base SDK iOS 4.3
  • Apple LLVM Compiler 2.1

I have started getting the following error:

fatal error: file '/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/../lib/clang/2.1/include/stdint.h' has been modified since the precompiled header was built

I have tried reinstalling Xcode and OS X - no luck. What's causing this?

like image 441
grfryling Avatar asked Aug 15 '11 22:08

grfryling


2 Answers

First try a clean build via the Product -> Clean menu (as of XCode 4.6.2).

If that still doesn't work then open the Organizer (from the menu select Window->Organizer). Once the Organizer is open, select Projects from the toolbar at the top of the window. On the left is a list of projects, select the one you are having a problem with.

The details panel (to the right of the list) will display the project name, location, status. The row beneath that shows where the Derived Data is located. Click the Delete... button the far right. A dialog will appear, click Delete.

You can also manually delete the Derived Data:

~/Library/Developer/Xcode/DerivedData/{project name + gobly-gook} 

This directory contains built products and indexes for the project. It is OK to delete it because it only contains items generated by Xcode. Xcode will regenerate everything next time the project is opened.

like image 140
logancautrell Avatar answered Sep 28 '22 03:09

logancautrell


I was able to fix it in a much easier way, by simply choosing Product > Clean, then Product > Build from the Xcode menubar.

like image 35
Darwin Smith II Avatar answered Sep 28 '22 03:09

Darwin Smith II