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

Re: Linking C++ and Objective-C files


  • Subject: Re: Linking C++ and Objective-C files
  • From: Philip Aker <email@hidden>
  • Date: Fri, 24 Jul 2009 01:14:17 -0700

On 2009-07-24, at 00:58:30, Andreas Menzi wrote:

I have a problem linking an m-file in my project which is a C++ bundle. I tried to include the m-file from the following code sample in my project:
http://developer.apple.com/samplecode/CarbonCocoa_PictureCursor/ the code is the following:

That example isn't setup so that you can yank code from it (do a GetInfo on the main.c to see why it compiles with Objective-C call in it).


For your C++ project, I think if you rename the .c and .m files to have the extension .mm things should work.
You may need to put some guards in the header as well.


Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@

Democracy: Two wolves and a sheep voting on lunch.

_______________________________________________
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


References: 
 >Linking C++ and Objective-C files (From: Andreas Menzi <email@hidden>)

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