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

Re: Using Objective-C object in C++ source


  • Subject: Re: Using Objective-C object in C++ source
  • From: Shawn Erickson <email@hidden>
  • Date: Thu, 14 May 2009 12:18:19 -0700

On Thu, May 14, 2009 at 11:44 AM, K. Chen <email@hidden> wrote:
> Does it mean I can write C++ code inside Objective-C program (with certain
> constraints) but not vice versa?

You can mix both ways if you compile your source as Objective-C++.

Review the link someone posted earlier for detail but...

- C++ classes found in Objective-C++ (.mm) source files are true C++
objects when compiled.
- Objective-C classes found in Objective-C++ (.mm) source files are
true Objective-C objects when compiled.

- Objective-C methods can call C++ methods, etc. if using Objective-C++
- C++ methods can send Objective-C messages, etc. if using Objective-C++

The issues are primarily in the realm of having C++ instance members
in Objective-C classes and exceptions.

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

This email sent to email@hidden

  • Follow-Ups:
    • Re: Using Objective-C object in C++ source
      • From: Michael Crawford <email@hidden>
References: 
 >Using Objective-C object in C++ source (From: "K. Chen" <email@hidden>)
 >Re: Using Objective-C object in C++ source (From: Dave Carrigan <email@hidden>)
 >Re: Using Objective-C object in C++ source (From: Andreas Grosam <email@hidden>)
 >Re: Using Objective-C object in C++ source (From: "K. Chen" <email@hidden>)

  • Prev by Date: Re: Watchpoints broken for 64-bit apps?
  • Next by Date: Re: Using Objective-C object in C++ source
  • Previous by thread: Re: Using Objective-C object in C++ source
  • Next by thread: Re: Using Objective-C object in C++ source
  • Index(es):
    • Date
    • Thread