Skip navigation.
 
mlRe: Header Files and Links to documentation
FROM : Bob Ippolito
DATE : Tue Nov 02 08:43:47 2004

On Nov 1, 2004, at 8:32, Ole Voß wrote:

> As a summary I've definitely learnt that header files must be
> re-included for each separate source file that they are required in.
> 'Source' means '.m', '.c', '.cpp'!
> I've also learnt that the '.m' file has no special meaning for the
> compiler - it doesn't seem to have a special 'all-encompassing'
> meaning, but rather it's just another sourcefile which represents the
> starting point to my later program.


Uh, not true.  The file extension has a very special meaning to the
compiler.  If the extension is '.m' it's compiled as Objective C
source, '.mm' is Objective C++ source, '.cpp' is C++ source, etc.  This
can be overridden if you specify -language to gcc, but the default is
determined by the source file's extension.

-bob