• 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: bringing windows c++ code to Macintosh
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bringing windows c++ code to Macintosh


  • Subject: Re: bringing windows c++ code to Macintosh
  • From: M Pulis <email@hidden>
  • Date: Wed, 10 Sep 2008 08:30:30 -0700

Many thanks for the clarification.

Gary




On Sep 10, 2008, at 7:42 AM, Michael Watson wrote:

On 10 Sep, 2008, at 07:52, M Pulis wrote:

On Sep 10, 2008, at 2:34 AM, Ken Thomases wrote:

As others have pointed out, a big part of your problem is that you're trying to compile plain C (or Objective-C) files that contain C++ code. You need to put C++ code into .cpp or .mm files. (It is possible to tell Xcode to treat a file as C++ or Objective-C++ regardless of its extension, but you'll just confuse yourself if you go that route.)

The C++ code is in .cpp files. I looked a File Types in the workspace guide, and I agree, I do not need more confusion.


What is the difference between ".m" and ".mm" files? A .m file can not access C++ code?

Thanks!

Xcode uses the file extension as a hint to know how to compile the file. Files ending in .m will be compiled with the Objective-C compiler mode, where C++ is nonsensical; .mm will be compiled as Objective-C++, where both runtimes can be used.



-- m-s

_______________________________________________ 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: 
 >bringing windows c++ code to Macintosh (From: M Pulis <email@hidden>)
 >Re: bringing windows c++ code to Macintosh (From: Ken Thomases <email@hidden>)
 >Re: bringing windows c++ code to Macintosh (From: M Pulis <email@hidden>)
 >Re: bringing windows c++ code to Macintosh (From: Michael Watson <email@hidden>)

  • Prev by Date: Re: bringing windows c++ code to Macintosh
  • Next by Date: Re: Porting projects from Windows
  • Previous by thread: Re: bringing windows c++ code to Macintosh
  • Next by thread: Re: bringing windows c++ code to Macintosh
  • Index(es):
    • Date
    • Thread