• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[TIP] What causes [multiple precompiled headers] and how can I fix it ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[TIP] What causes [multiple precompiled headers] and how can I fix it ?


  • Subject: [TIP] What causes [multiple precompiled headers] and how can I fix it ?
  • From: Chris Espinosa <email@hidden>
  • Date: Thu, 20 Apr 2006 20:08:45 -0700

On Apr 20, 2006, at 5:52 PM, Alec Carlson wrote:

I have a project with 6 targets. If I build one of the targets, Xcode

insists on recompiling my precompiled header multiple times:


Precompiling Sources/includes/myproject_prefix.h

Precompiling Sources/includes/myproject_prefix.h

Precompiling Sources/includes/myproject_prefix.h

Precompiling Sources/includes/myproject_prefix.h

Precompiling Sources/includes/myproject_prefix.h

Precompiling Sources/includes/myproject_prefix.h

Precompiling Sources/includes/myproject_prefix.h

Precompiling Sources/includes/myproject_prefix.h


I am running xcode 2.2 on 10.4.6. Any thoughts on why this is occurring and

how I can prevent it ?


If you 6 targets use the same prefix but have very different build settings, this is normal and necessary: the nature of gcc's precompiled headers makes them very sensitive to build flag differences.

You can tell what is making your headers different by looking at directories in /Library/Caches/com.apple.Xcode.501/SharedPrecompiledHeaders and comparing the .hash-criteria in the ones you think ought to be the same.  Adjust your target build settings to eliminate differences, and Xcode will share the precomps.

One difference is in Preprocessor Macros.  If you have any of these set, try moving them to "Preprocessor Macros Not Used In Precompiled Headers"; that will exclude them from the comparison and tend to increase sharing.

Chris
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >What causes this and how can I fix it ? (From: Alec Carlson <email@hidden>)

  • Prev by Date: Re: Why no execinfo.h?
  • Next by Date: /usr/i686-apple-darwin8/lib/ gcc problems from commandline
  • Previous by thread: What causes this and how can I fix it ?
  • Next by thread: Re: What causes this and how can I fix it ?
  • Index(es):
    • Date
    • Thread