Re: bringing windows c++ code to Macintosh
Re: bringing windows c++ code to Macintosh
- Subject: Re: bringing windows c++ code to Macintosh
- From: Michael Watson <email@hidden>
- Date: Wed, 10 Sep 2008 10:42:56 -0400
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