• 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: Sean McBride <email@hidden>
  • Date: Wed, 23 Feb 2011 13:55:25 -0500
  • Organization: Rogue Research Inc.

On Wed, 23 Feb 2011 11:47:23 -0700, James Bucanek said:

>I have a couple of large Cocoa projects that suddenly need to
>use some C++ libraries (3D graphics stuff).

Two useful thoughts:

1) You can use 'id' in your C++ by including the pure C header <objc/objc.h>.

2) You can keep C++ out of your Obj-C .h files like so:

#ifdef __cplusplus
 	typedef SomeCPPClassPtr SomeCPPClassRef;
#else
 	typedef void* SomeCPPClassRef;
#endif

hth,

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

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: Help Mixing Objective-C & Objective-C++
      • From: James Bucanek <email@hidden>
    • Re: Help Mixing Objective-C & Objective-C++
      • From: Ken Thomases <email@hidden>
References: 
 >Help Mixing Objective-C & Objective-C++ (From: James Bucanek <email@hidden>)

  • Prev by Date: Help Mixing Objective-C & Objective-C++
  • Next by Date: Re: Help Mixing Objective-C & Objective-C++
  • Previous by thread: Help Mixing Objective-C & Objective-C++
  • Next by thread: Re: Help Mixing Objective-C & Objective-C++
  • Index(es):
    • Date
    • Thread