Re: Objective-C++
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