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

前端 未结 11 1070
时光说笑
时光说笑 2020-12-12 15:54

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

相关标签:
11条回答
  • 2020-12-12 15:59

    Clean ways are not working for me, eventually I solved this issue by reinstall XCode.

    0 讨论(0)
  • 2020-12-12 16:01

    Remove the contents for the Simulator by iOS Simulator > Reset Content and Settings... and hit Rest. This will remove any existing pre-compiled instances of the headers and resources. This worked for me

    0 讨论(0)
  • 2020-12-12 16:04

    Deleting the DerivedData folder did not work for me when Archiving.

    I had to look at Build Settings - Build Locations - Precompiled Header Cache Path and delete that folder.

    For me that was:

    /var/folders/_w/t0mj70hd1439tqgxff7_mtt00000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders
    
    0 讨论(0)
  • 2020-12-12 16:09

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

    0 讨论(0)
  • 2020-12-12 16:15

    I thought I would add a separate answer rather than a comment to Cryptognome's answer, because it is in fact a different solution when the issue comes from running xcodebuild. Like Cryptognome, I had the error come up with the command-line tool xcodebuild. As an alternative to manually going into the /var subfolders, I found that I could set my own cache for the shared PCH, which you can do by setting the environment variable SHARED_PRECOMPS_DIR, e.g as follows

    xcodebuild -target Foo -configuration Release SHARED_PRECOMPS_DIR=/tmp/foo/SharedPCH
    

    This way, I never get the error in automatic builds.

    Note in the above command, I would also typically set the OBJROOT and SYMROOT env var to build also in /tmp. At the end, I clean things up.

    0 讨论(0)
  • 2020-12-12 16:15

    I tried above all but no use. Finally I deleted Xcode and re installed again. Now it is working fine..

    Xcode->delete->install again

    It might help some one...

    0 讨论(0)
提交回复
热议问题