ARC forbids Objective-C objects in structs or unions
Posted: Tue Nov 22, 2011 6:57 am
Step 1) start a new project in Xcode with ARC enabled
Step 2) add objective chipmunk to it
Step 3) #import "ObjectiveChipmunk.h"
You'll find 5 compile errors when you try to run it:
cpBody.h:83:16: error: ARC forbids Objective-C objects in structs or unions [4]
cpDataPointer data;
^
cpShape.h:85:16: error: ARC forbids Objective-C objects in structs or unions [4]
cpDataPointer data;
^
cpArbiter.h:42:18: error: ARC forbids Objective-C objects in structs or unions [4]
cpCollisionType a;
^
cpConstraint.h:81:16: error: ARC forbids Objective-C objects in structs or unions [4]
cpDataPointer data;
^
cpSpace.h:72:16: error: ARC forbids Objective-C objects in structs or unions [4]
cpDataPointer data;
^
5 errors generated.
Step 2) add objective chipmunk to it
Step 3) #import "ObjectiveChipmunk.h"
You'll find 5 compile errors when you try to run it:
cpBody.h:83:16: error: ARC forbids Objective-C objects in structs or unions [4]
cpDataPointer data;
^
cpShape.h:85:16: error: ARC forbids Objective-C objects in structs or unions [4]
cpDataPointer data;
^
cpArbiter.h:42:18: error: ARC forbids Objective-C objects in structs or unions [4]
cpCollisionType a;
^
cpConstraint.h:81:16: error: ARC forbids Objective-C objects in structs or unions [4]
cpDataPointer data;
^
cpSpace.h:72:16: error: ARC forbids Objective-C objects in structs or unions [4]
cpDataPointer data;
^
5 errors generated.