• 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: Objective-C++
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Objective-C++


  • Subject: Re: Objective-C++
  • From: Jens Miltner <email@hidden>
  • Date: Mon, 11 Feb 2008 17:52:11 +0100


Am 09.02.2008 um 01:04 schrieb Herb Petschauer:

Depends on what you are doing.  If you are actually writing a Cocoa
App then why not create a new Cocoa App?  You get a default nib, etc.
for free.  Just create new files with .mm.

In case this is not immediately obvious - if you choose a template from Xcode's "New File..." asisstant, you can rename the file to end with .mm right there.


BTW: I found it easier to have _all_ my Objective-C files have .mm extensions. Most of our code does reference a C++ class or the other and even for pure Objective-C code having it compiled as Objective-C++ usually doesn't hurt (unless you compile against a library that doesn't have C++-savvy header files).
By making all my files Objective-C++, I avoid these 10 minutes of confusion until I discover that the only reason the compiler complains about some apparently well-formed C++ header file is because it's compiling in plain-C mode ;-)


</jum>

_______________________________________________

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


  • Follow-Ups:
    • Re: Objective-C++
      • From: "Sean McBride" <email@hidden>
    • Re: Objective-C++
      • From: Scott Andrew <email@hidden>
References: 
 >Objective-C++ (From: Philip Bridson <email@hidden>)
 >Re: Objective-C++ (From: Philip Bridson <email@hidden>)
 >Re: Objective-C++ (From: John Stiles <email@hidden>)
 >Re: Objective-C++ (From: Philip Bridson <email@hidden>)
 >Re: Objective-C++ (From: "Herb Petschauer" <email@hidden>)
 >Re: Objective-C++ (From: "Herb Petschauer" <email@hidden>)
 >Re: Objective-C++ (From: Philip Bridson <email@hidden>)
 >Re: Objective-C++ (From: "Herb Petschauer" <email@hidden>)
 >Re: Objective-C++ (From: Philip Bridson <email@hidden>)
 >Re: Objective-C++ (From: "Herb Petschauer" <email@hidden>)

  • Prev by Date: Re: split up alloc and init?
  • Next by Date: Re: Objective-C++
  • Previous by thread: Re: Objective-C++
  • Next by thread: Re: Objective-C++
  • Index(es):
    • Date
    • Thread