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

Re: Mixing C++ with Objective-C


  • Subject: Re: Mixing C++ with Objective-C
  • From: Uli Kusterer <email@hidden>
  • Date: Sat, 21 Jan 2006 01:14:35 +0100

Am 20.01.2006 um 20:46 schrieb email@hidden:
When mixing C++ with Objective-C in a single project, is there ever a time
the suffix for C++ is used or all source files must use the Objective-C suffix
(.mm)?

".mm" is the suffix for Objective C++. The suffix for Objective C is ".m".


Generally, you must stick to those suffixes (though, technically, there's also ".M" for ObjC++, but that gets really confusing if you're not used to case-sensitive file systems, so I'd suggest you don't use that).

There is a way to run the ObjC++ compiler on files with other extensions by correctly setting up some settings in your Xcode project (or by passing the proper flags to GCC), but you also often see that programmers change the suffix of a file or write a wrapper C+ + class that calls the actual ObjC++ class.

Cheers,
-- M. Uli Kusterer
http://www.zathras.de


_______________________________________________ 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
  • Follow-Ups:
    • Re: Mixing C++ with Objective-C
      • From: Scott Ribe <email@hidden>
References: 
 >Mixing C++ with Objective-C (From: email@hidden)

  • Prev by Date: Re: Toolbar Images
  • Next by Date: Re: drawing and setting pixels
  • Previous by thread: Re: Mixing C++ with Objective-C
  • Next by thread: Re: Mixing C++ with Objective-C
  • Index(es):
    • Date
    • Thread