__OBJC__ equivalent for Objective-C++

__OBJC__ equivalent for Objective-C++

I'm compiling a .mm file (Objective-C++) for an iPhone application, and the precompiled header fails to include the base classes.

I tracked it down to the following:

#ifdef __OBJC__     #import <Foundation/Foundation.h>     #import <UIKit/UIKit.h> #endif 

Turns out, __OBJC__ is undefined for mm files, whereas it is defined for standard m files.

Is there any other flag I can use instead?

SSLHandshakeException unknown_ca apns java


NSMutableArray containsObject method not detecting object
If you invoke gcc with -dM -E it will stop after preprocessing, and list all #defines . Adding unique objects to Core DataThis normally how I check what built-in defines are set; however I just tried this with a test .mm file and __OBJC__ is defined for me, so I'm not sure why it isn't defined for you.. Using an existing C++ engine on the iPhone
$ echo "int foo() {};" > tmp.mm $ gcc -dM -E tmp.mm|grep OBJ #define __OBJC__ 1 #define OBJC_NEW_PROPERTIES 1 
How do I set these break points in ~/.gdbinit?

70 out of 100 based on 45 user ratings 720 reviews