I'm compiling against an API whose header files are in the "api" subdirectory of my project. A new beta of the API was recently released, and its header files are in "api-beta".
I created a duplicate of one of my targets and changed the header search path to use "api-beta", but it's not working: the new target refuses to link; preprocessing one of the files shows it is including the old headers, not the new ones (but it's linking against the new library).
The problem seems to be with the .hmap file that Xcode produces. I took the command-line that Xcode echoes to the build transcript and experimented with it in Terminal. If I remove the -Iblah/blah.hmap option to the command, the file is compiled against the correct set of of headers, and the project then links properly.
I tried a pristine copy from version control. I also tried creating a new build configuration with the different header search path, in addition to using a different target. None of these things worked. The only way I could get it to link was to delete the old "api" directory. (Which is not really acceptable as a solution, since I still need to build targets based off the release API.)
Any idea why Xcode is picking up the wrong directory for the hmap file or how to workaround the problem? I don't want to have to maintain two separate projects.