Page 1 of 1

ARC forbids Objective-C objects in structs or unions

Posted: Tue Nov 22, 2011 6:57 am
by midi3
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.

Re: ARC forbids Objective-C objects in structs or unions

Posted: Tue Nov 22, 2011 11:34 am
by slembcke
The current development version of Chipmunk Pro does support ARC. I've set up a Git repository for Chipmunk Pro. You can log in using the same username/password as the download site. Check the end of the blog post here to see how to do it: http://howlingmoonsoftware.com/wordpress/?p=657

Re: ARC forbids Objective-C objects in structs or unions

Posted: Wed Nov 23, 2011 12:05 am
by midi3
Excellent. That works like a champ. Thanks for the quick response!