• 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: [SOLVED] C++ in a Cocoa App - How Hard is THAT?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [SOLVED] C++ in a Cocoa App - How Hard is THAT?


  • Subject: Re: [SOLVED] C++ in a Cocoa App - How Hard is THAT?
  • From: Matthew Owings <email@hidden>
  • Date: Mon, 10 Oct 2005 11:43:51 -0700

Hello all

I mix C++ and Objective-C in my project. If any objective-C file needs to deal with C++ I give it a .mm extension and it works fine. So if you don't change the 'Compile Source As' setting, you need to name any objective-C file that includes a C++ header with a .mm extension.

Matt Owings

Message: 6
Date: Sat, 8 Oct 2005 11:20:14 -0600
From: Lance Drake <email@hidden>
Subject: [SOLVED]  C++ in a Cocoa App - How Hard is THAT?
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; format=flowed

Hi XCode folks,

Many thanks to the very nice folks who chimed in on this issue. For
the record, here's what ended getting me the traction to move on past
that problem.


    Compiling the C++ file occurs entirely without incident - it was
including the C++ header file with 'class myObject {... }' in the
Objective-C header that caused all the commotion.

    In the project 'style' settings I set "Compile Sources As" to be
'Objective-C++'.  That was it.  I KNEW it had to be something simple -
hence the query, "How hard is THAT?".

It was interesting to chase all over the net and through all the books
I have and find so little that specifically dealt with this issue. The
fact that a number of folks immediately responded was a heart-warming
feeling to know that there IS a Mac developer community out there and
it's so full of kind, intelligent souls.


Best Regards,

Lance Drake
_______________________________________________
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


  • Prev by Date: Re: warnings
  • Next by Date: Re: XCode, next release...
  • Previous by thread: [SOLVED] C++ in a Cocoa App - How Hard is THAT?
  • Next by thread: Setting a build setting that will work as an environment variable in the build phase
  • Index(es):
    • Date
    • Thread