To be clear, the issue is a conflict between both what the Cocos2D and Objective Chipmunk are doing. There isn't anything I can do to Objective Chipmunk alone that won't break compatibility with existing code. I need to work with Riq on getting a fix in both places. Also keep in mind that the version of Cocos2D where this is an issue is still in beta.
The workaround is a little annoying, but really it's at most a one line fix per file.
New Project - chipmunk_private.h errors
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: New Project - chipmunk_private.h errors
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
-
- Posts: 89
- Joined: Thu Dec 15, 2011 9:18 am
- Contact:
Re: New Project - chipmunk_private.h errors
Hello again-
I just upgraded to cocos2d 2.1 rc0 and ObjectiveChipmunk 6.1.2. The errors are back. I tried running the patch again... no joy. It fails on 2 of 3 hunks. Any ideas?
I just upgraded to cocos2d 2.1 rc0 and ObjectiveChipmunk 6.1.2. The errors are back. I tried running the patch again... no joy. It fails on 2 of 3 hunks. Any ideas?
Chipmunk Pro and cocos2D 2.x branch for iOS development
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: New Project - chipmunk_private.h errors
Sorry about the delay. I'm trying to catch up on missed posts this morning. Taking a look right now.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: New Project - chipmunk_private.h errors
Ok. I came up with a better solution to this. I'm submitting it as a patch to Cocos2D now. When enabling CC_ENABLE_CHIPMUNK_INTEGRATION, you can also set CC_CHIPMUNK_IMPORT (the patch will make this clear).
A simpler workaround than before, and less work for Riq to worry about.
A simpler workaround than before, and less work for Riq to worry about.
- Attachments
-
- ObjectiveChipmunkIntegration.patch
- (909 Bytes) Downloaded 381 times
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
-
- Posts: 39
- Joined: Sat Feb 23, 2013 1:03 pm
- Contact:
Re: New Project - chipmunk_private.h errors
I've downloaded this, although the previous work around wasn't all that big of a deal. How do you install this patch?
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: New Project - chipmunk_private.h errors
Buried earlier in the thread:
The patch file is so short this time though that if you can't get the patch command to work on the first try, just open the patch in a text editor and copy/paste it into the Cocos2D code. There are only two spots that need to be changed.... cd to wherever the cocos2d directory in your project is (should be in a directory named lib from the templates) and type "patch -p1 -i /path/to/the/patch/file"
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
-
- Posts: 39
- Joined: Sat Feb 23, 2013 1:03 pm
- Contact:
Re: New Project - chipmunk_private.h errors
OK looked it over and basically you are enabling the chipmunk integration in the ccConfig.h and adding the CC_CHIPMUNK_IMPORT definition for Objective Chipmunk, then in the cocos2d.h you are including the Obj-Chipmunk import there correct?slembcke wrote:Buried earlier in the thread:The patch file is so short this time though that if you can't get the patch command to work on the first try, just open the patch in a text editor and copy/paste it into the Cocos2D code. There are only two spots that need to be changed.... cd to wherever the cocos2d directory in your project is (should be in a directory named lib from the templates) and type "patch -p1 -i /path/to/the/patch/file"
So then now anytime I import cocos2.h then I will no longer need to import the ObjectiveChipmunk.h, only if I need it and I'm not already importing the cocos2d files right?
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: New Project - chipmunk_private.h errors
Correct. Objective-Chipmunk.h will be imported everywhere cocos2d.h is.
Also, Riq just already merged the pull request. \o/ Should be out in the next release of Cocos2D then.
https://github.com/cocos2d/cocos2d-iphone/pull/293
Also, Riq just already merged the pull request. \o/ Should be out in the next release of Cocos2D then.
https://github.com/cocos2d/cocos2d-iphone/pull/293
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Who is online
Users browsing this forum: No registered users and 5 guests