Re: Preccompiled header compatibility
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