• 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: ObjC++ and .mm vs .cpp
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ObjC++ and .mm vs .cpp


  • Subject: Re: ObjC++ and .mm vs .cpp
  • From: Markus Hitter <email@hidden>
  • Date: Wed, 7 Sep 2005 11:40:18 +0200


Am 06.09.2005 um 19:42 schrieb Peter.Teeson:

Having read all I can find about Objective-C++ I still have a question and it's this:
In my project can I have source files with the .cpp extension as well as .mm?

Yes. You can link objects compiled with any of the gcc compilers together. For some combinations you need hints like


    extern C {
        // some C code
    }

IOW can I keep my C++ model files with the .cpp extension or MUST they all be .mm?

You want the .mm extension if the source contains Obj-C as well as C+ +. Keep the .c extension for plain C files, .cpp for pure C++ and .m for pure Obj-C. This speeds up your compilations and keeps your language separation tidy.



Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/




_______________________________________________ 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: ObjC++ and .mm vs .cpp
      • From: Steve Checkoway <email@hidden>
References: 
 >ObjC++ and .mm vs .cpp (From: "Peter.Teeson" <email@hidden>)

  • Prev by Date: Re: ObjC++ and .mm vs .cpp
  • Next by Date: Re: ObjC++ and .mm vs .cpp
  • Previous by thread: Re: ObjC++ and .mm vs .cpp
  • Next by thread: Re: ObjC++ and .mm vs .cpp
  • Index(es):
    • Date
    • Thread