Re: VERY Newbie question: include paths
Re: VERY Newbie question: include paths
- Subject: Re: VERY Newbie question: include paths
- From: Andy Wiese <email@hidden>
- Date: Tue, 2 Nov 2004 17:21:00 -0600
On Nov 2, 2004, at 4:36 PM, Markian Hlynka wrote:
On Nov 2, 2004, at 10:03, Brian Smith wrote:
XCode uses gcc as the compiler and any information on how it treats
include search paths and flags that can be set are in the gcc's
documentation. XCode tries to give you a more human readable
interface to these flags. The historically preferred method to deal
with including headers on UNIX systems, where gcc was born, has been
to set the base directory for header files, with the flag -I
/path/to/my/project, and indicate the subdirectory path in the
#include statement, example #include "mysubdir/M_.h". I doubt gcc
has a flag for searching subdirectories in the search directory, but
you might check gcc's documentation. It basically comes down to a
developer preference of being explicate, the UNIX way, compared to
implicate, the PC/Codewarrior way, on searching for headers in
subdirectories.
That said,
-select your project in the project window
-get info (command-i or click on the 'info' button in the toolbar)
-click on "Styles"
-make sure "All settings" is displayed as the head of the left hand
column.
-in the search box on the bottom, type in "header"
-modify the setting "header Search Paths" appropriately.
-come and gripe on the list that it doesn't work for all build styles.
-someone will explain to you which styles override which others
(targets, builds, or whatever)
-come back and gripe at the counter-intuitiveness thereof.
Hope that helps!
Thank you both. This confirms the conclusions I was reaching. I am
somewhat familiar with gcc but never used it on a large project (one
reason I'm switching). I looked at the gcc input in the build window
and realized that is impractical to think that you could have an -I
setting for every embedded header file. I have been considering moving
to a more unix styled source tree anyway.
That said though... Is there any case in Xcode where a header file
reference in the source group or target will affect the -I paths passed
to gcc? I have seen no evidence of this, but the documentation and
other posts in this list imply it.
My only gripe is that this is so basic, I would expect the "Getting
Started..." doc to say something specific about the include path
setting.
_______________________________________________
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