Re: Compiler pukes on Cocoa.h in .mm/.h file; __OBJ__ not defined
Re: Compiler pukes on Cocoa.h in .mm/.h file; __OBJ__ not defined
- Subject: Re: Compiler pukes on Cocoa.h in .mm/.h file; __OBJ__ not defined
- From: Kyle Sluder <email@hidden>
- Date: Fri, 27 Feb 2015 15:06:51 -0600
On Fri, Feb 27, 2015, at 02:17 PM, Jerry Krinock wrote:
> I’ve added a .mm Objective-C++ file to an old C++ project. It has no
> code in it yet, except an empty Objecive-C @implementation. Also, it
> #imports a counterpart .h file which in turn #imports <Cocoa/Cocoa.h>.
>
> In Xcode 6.1, the compiler pukes on #import <Cocoa/Cocoa.h>, as though it
> does not know any Objective-C. Testing the __OBJC__ macro, it is
> undefined.
>
> The File Inspector indicates that my .mm file’s type is “Default -
> Objective-C++ Source” and the counterpart .h is “Default - C Header”.
> Looks OK to me. Is there another Objective-C switch that needs to be
> flipped on somewhere?
What does the build log say for that file?
--Kyle Sluder
_______________________________________________
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