• 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
Re: Preccompiled header compatibility
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Preccompiled header compatibility


  • Subject: Re: Preccompiled header compatibility
  • From: Chris Espinosa <email@hidden>
  • Date: Mon, 31 Aug 2009 09:59:54 -0700


On Aug 31, 2009, at 6:24 AM, Stefan Haller wrote:

I need to find out whether a precompiled header is compatible with the
current version of gcc that I'm building with. To do this, I remember
the version that the precompiled headers were built with (by using the
last line of the output of gcc -v), and when building again I check that
it matches the current gcc; if it doesn't, I know I need to delete the
precompiled headers.


This has worked well with Devtools updates in the past, but it failed
for the upgrade from Xcode 3.1.3 on 10.5 to Xcode 3.2 on Snow Leopard.
The build number returned by "gcc-4.0 -v" is the same for both:

  gcc version 4.0.1 (Apple Inc. build 5493)

but still the precompiled headers are incompatible.

Is there some other information besides gcc -v that I can query for this
purpose?

The information that determines precompiled header compatibility is stored inside the precompiled header itself. Open ~/Library/Caches/ Xcode/SharedPrecompiledHeaders/Foo-[UUID]/Foo.pch.gch.hash-criteria in any text editor, and you'll see the command-line options that it was built with. Any difference in these command line options will cause the precompiled header to be regenerated.


But in your case the most likely cause is one or the other of thses:

- in Snow Leopard, the default compiler is gcc 4.2
- in Snow Leopard, the Xcode tool chain runs in 64-bit mode

Either of these would cause the precompiled headers to be regenerated.

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


  • Follow-Ups:
    • Re: Preccompiled header compatibility
      • From: email@hidden (Stefan Haller)
References: 
 >Preccompiled header compatibility (From: email@hidden (Stefan Haller))

  • Prev by Date: font change
  • Next by Date: Re: font change
  • Previous by thread: Preccompiled header compatibility
  • Next by thread: Re: Preccompiled header compatibility
  • Index(es):
    • Date
    • Thread