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

Re: Mixing Objective-C and C++


  • Subject: Re: Mixing Objective-C and C++
  • From: Chad Leigh <email@hidden>
  • Date: Tue, 7 Nov 2006 12:05:41 -0700


On Nov 7, 2006, at 11:59 AM, Nick Zitzmann wrote:


On Nov 7, 2006, at 11:56 AM, Jason T. Slack wrote:

I know that I can bring the QT Frameworks into XCode and write some code and link against them, but how do I from the Objective-C side call the C++ code that I want to use?

Change the source code extension from .m to .mm. Then the compiler will treat the source as an Obj-C++ file.

And to expound on that -- Objective-C is just C with an object facility added. Being so, you can call C++ the way you would call it from any C program.


Chad

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


References: 
 >Mixing Objective-C and C++ (From: "Jason T. Slack" <email@hidden>)
 >Re: Mixing Objective-C and C++ (From: Nick Zitzmann <email@hidden>)

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