Targets and include files..
Targets and include files..
- Subject: Targets and include files..
- From: Andrew Cunningham <email@hidden>
- Date: Mon, 20 Nov 2006 21:38:10 -0800
I have come back to XCode 2.4.1 after a long hiatus, and must be
missing something very obvious about targets and include files....
Assume I have a project with two targets "Target 1" and "Target 2"
"Target 1" has an include file "A.h" file. This file is in the XCode
project - 'Get Info' on this include file shows it as a member of
"Target 1" ONLY
"Target 2" has a source file, B.cpp. B.cpp has a '#include "A.h"',
but it is meant to be a different "A.h" pointed to by the targets "-
I" directive. B.cpp is a member of "Target 2" ONLY. "Target 2"'s
include file paths specifically do not reference the location of the
"A.h" file that is in "Target 1".
The problem is that when compiling B.cpp ( part of Target 2), XCode
is including the "A.h" (from "Target 1"). Presumably header files
added to the project implicitly becomes an include file for all
targets , despite the target membership of the header file.
I find this behavior quite strange. I am clearly indicating to XCode
that the "A.h" in the project belongs only to "Target 1". I think
it's really nice in XCode that when you add header files to XCode,
they become implicitly part of the "include" path, but there should
be control of this at the target level.
Andrew
_______________________________________________
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