Re: Adding obj-c++ file to carbon project changes, preprocessed header file types
Re: Adding obj-c++ file to carbon project changes, preprocessed header file types
- Subject: Re: Adding obj-c++ file to carbon project changes, preprocessed header file types
- From: Stephen Hoffman <email@hidden>
- Date: Wed, 13 Feb 2008 14:50:21 -0500
- Organization: HoffmanLabs LLC
When porting C code around, various C compilers can have a first-include
mechanism, a way to affix a header file onto the front of a source code
module. When specified, the build can selectively feed in a header file
containing the appropriate build-level personality, all via an include
file. And for the ease of porting code around among environments and
platforms, often without requiring source changes.
Here's the gcc analog:
-include file
Process file as if "#include "file"" appeared as the first
line of
the primary source file. However, the first directory
searched for
file is the preprocessor's working directory instead of the
direc-
tory containing the main source file. If not found there, it is
searched for in the remainder of the "#include "..."" search
chain
as normal.
As for the specific case of colliding header files mentioned by Russ,
there are (also) gcc switches to control the include directory path.
This first-include file is where you can (usually) alter the names of
common (colliding) functions, set conditional flags, aim missing
functions over toward private libraries (and libraries with functions
under different and non-reserved names) via define, and various of the
other tasks common to porting code.
All fodder for the Xcode list, most likely.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden