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

Re: Help Mixing Objective-C & Objective-C++


  • Subject: Re: Help Mixing Objective-C & Objective-C++
  • From: Kyle Sluder <email@hidden>
  • Date: Wed, 23 Feb 2011 10:56:06 -0800

On Wed, Feb 23, 2011 at 10:47 AM, James Bucanek <email@hidden> wrote:
> I have a couple of large Cocoa projects that suddenly need to use some C++
> libraries (3D graphics stuff). I assume that I can simply start creating
> Objective-C++ classes to contain this code, but I'm wondering how to cleanly
> integrate the new Objective-C++ classes with the existing Objective-C
> classes. Naturally, I need to send messages from my Objective-C classes to
> my Objective-C++ classes, and vice versa.

This isn't how Objective-C++ works. Objective-C++ lets you include C++
and Objective-C code in the same module. You can send messages from
C++ classes to Objective-C objects, and you can call C++ code from
Objective-C methods.

It does not unify the Objective-C and C++ class hierarchies. They are
incompatible. Please read the "Using C++ with Objective-C" section of
The Objective-C Programming Language guide:
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocCPlusPlus.html

--Kyle Sluder
_______________________________________________

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

References: 
 >Help Mixing Objective-C & Objective-C++ (From: James Bucanek <email@hidden>)

  • Prev by Date: Re: Help Mixing Objective-C & Objective-C++
  • Next by Date: IBOutlet to different classes, conditional build
  • Previous by thread: Re: Help Mixing Objective-C & Objective-C++
  • Next by thread: Re: Help Mixing Objective-C & Objective-C++
  • Index(es):
    • Date
    • Thread