I have recently upgraded to Xcode 3.1.1 from Xcode
2.3. My projects, when compiled with gcc-3.3 for ppc support of 10.3,
fail to compile now because the way the .hmap file is created is different.
Some background: I am working with a source base where someone created a
file called Assert.h (bad style, I know…) and I can’t rename it.
The conflict with the system assert.h isn’t overly difficult to work
around (one is <>, one is “”) given the user vs. general
include support, and all was set up to work well with Xcode 2.3: With
gcc-3.3 it properly emits the –IPathToAssertDir followed by a -I- so it
can distinguish the two.
Xcode 3.1.1 also emits the right command line, but the .hmap is different
resulting in my Assert.h being included in places including <assert.h>.
When I run the command line in the shell without the .hmap included everything
works fine. When I swap in a .hmap generated from Xcode 2.3 everything
works fine.
The difference in the .hmap is the Xcode 2.3 version seems essentially blank
(aside from the magic number and probably a file size field) whereas the Xcode
3.1.1 version has some text at the end: Assert.h as well as a path to it
and a path to my build dir.
Why might Xcode 3.1.1 be generating a different .hmap? Why does this only
affect gcc-3.3 (gcc-4.0 for i386 or ppc work fine)?
I found this message searching for a solution: http://lists.apple.com/archives/xcode-users/2006/Dec/msg00093.html
With this knowledge I can work around the problem with USE_HEADERMAP = NO, but
I would rather not take the performance hit. Does anyone know if this is
a known bug that was added since Xcode 2.3?
David Litwin
BigFix, Inc.