• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Header Files and Links to documentation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Header Files and Links to documentation


  • Subject: Re: Header Files and Links to documentation
  • From: Bob Ippolito <email@hidden>
  • Date: Tue, 2 Nov 2004 02:43:47 -0500

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

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: Where to include header files - relates to last question on variable scope (From: Jiri Volejnik <email@hidden>)
 >Re: Where to include header files - relates to last question on variable scope (From: Ole Voß <email@hidden>)
 >Header Files and Links to documentation (From: Ole Voß <email@hidden>)

  • Prev by Date: Re: NSImage release crash
  • Next by Date: How do I get the selected cells?
  • Previous by thread: Re: Header Files and Links to documentation
  • Next by thread: Re: Where to include header files - relates to last question on variable scope
  • Index(es):
    • Date
    • Thread