I've got a project that is primarily in C++, but I'm trying to link in a Objective-C++ library. I have a header that looks something like:
CPlus.h:
#import "OBJCObject.h"
class CPlus {
OBJCObject *someObj;
};
CPlus.mm:
CPlus::CPlus() {
someObj = [[OBJCObject alloc] init];
}
When I import the Objective-C++ header into my code I end up with thousands of errors from inside the iPhone SDK. It seems that something is treating one language as if it were another. Sorry if this description is poor, I'm new to this, and am somewhat confused.
Can you include Objective-C / Objective-C++ types in C++ classes? Is there something special you need to do to include the headers for the other types?