Compiler pukes on Cocoa.h in .mm/.h file; __OBJ__ not defined
Compiler pukes on Cocoa.h in .mm/.h file; __OBJ__ not defined
- Subject: Compiler pukes on Cocoa.h in .mm/.h file; __OBJ__ not defined
- From: Jerry Krinock <email@hidden>
- Date: Fri, 27 Feb 2015 12:17:56 -0800
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?
Thank you,
Jerry
_______________________________________________
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