On Feb 4, 2009, at 1:51 PM, Steve Checkoway wrote:
On Feb 4, 2009, at 4:46 AM, Stephen Northcott wrote:
Is the header file included in the Xcode project? I don't know if it has to be included in the particular target or not, but I seem to recall that it doesn't.
No. It is only included in the two or three files that reference it.
You need to include it in the project (but apparently not in the target). That's what's causing Xcode to not do dependency tracking for it and causing the problems you're seeing.
No, this shall not be required. However, in this case the path to the included file needs to be specified explicitly (otherwise the compiler wouldn't find it, or possibly another one). If the header is included in the project, Xcode by itself will find the path and tell it the compiler through "header maps".
In any case, Xcode is required to track the dependencies, which it will do it correctly AFAIK -- but we never know for sure ;)
I verified the case where a translation unit depends on an external header which is not put in the Xcode project and which is located in a non-system-path. It works like expected and honestly, this *must* work - otherwise the build-system is flawed.
For further testing, I would also disable header maps: in the settings set USE_HEADERMAP = NO.
Just to be sure, and in order to avoid any possibly conflict with any other header files.
Regards
Andreas