[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4764: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4765: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4766: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
Chipmunk Physics • View topic - Installation trouble with xcode

Installation trouble with xcode

Official forum for the .

Installation trouble with xcode

Postby Paul10 » Sat Jul 31, 2010 8:37 am

Hi,

I'm new to Chipmunk and would like to incorporate it into my app. I'm not using cocos2d and don't want to at this time. I'm trying to follow a dated tutorial (http://www.alexandre-gomes.com/articles/chipmunk/) but I'm getting stuck on the setup.

I've done the svn checkout http://chipmunk-physics.googlecode.com/svn/trunk/ chipmunk-physics-read-only to get the latest code. So, now I have some src and include directories that I'd like to get into xcode and start coding.

The problem I have seems to be how I'm importing the src and include folders. I've tried several ways to do it but I keep getting compile errors like my directory structure is incorrect. I've looked at the README but I must be missing something.

How do I get the raw source code into my xcode project?

Thanks for any help.

-Paul
Paul10
 
Posts: 17
Joined: Sat Jul 31, 2010 8:27 am

Re: Installation trouble with xcode

Postby slembcke » Sat Jul 31, 2010 12:07 pm

The easy way is to run the iphone-static.sh shell script in the macosx/ directory. Then all you need to do is copy that library and the include/chipmunk/ directory into your project. The script will compile a fat library that runs in debug mode on the simulator and optimized mode on the device. It also ensures that Chipmunk was compiled with all the correct optimization flags. You may need to adjust the SDK version in the script.

There isn't really any trick to include the actual source if that's what you want, but you do need do need to set a few compiler options. For one, Chipmunk is C99 code and GCC defaults to the C89 standard. You need to add the -std=C99, -ffast-math, and -O3 flags as well as disable thumb compilation. Because of this you probably want to compile Chipmunk as a separate static library. Without the correct optimization flags, Chipmunk will run at a fraction of the speed.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: Installation trouble with xcode

Postby slembcke » Sat Jul 31, 2010 12:11 pm

Oh, and I suppose I should warn you. I merged in some experimental performance features a couple days ago. I thought I had most of the issues worked out before merged the code into trunk, but it seems I may have broken some special cases of adding and removing bodies/shapes/joints to a space. I'm working to get it straightened out ASAP, but you can run "svn up -r480" to update to the version right before I put the changes in if you run into trouble.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: Installation trouble with xcode

Postby Paul10 » Sat Jul 31, 2010 1:50 pm

Thanks for the response. I ran the build script. When you say "include/chipmunk/ directory", do you mean when I "Add existing files" in xcode, that I should navigate to /include/chipmunk and select the chipmunk directory?
Paul10
 
Posts: 17
Joined: Sat Jul 31, 2010 8:27 am

Re: Installation trouble with xcode

Postby slembcke » Sat Jul 31, 2010 3:39 pm

I just copy the chipmunk/ directory and drop the static library in there. It really doesn't matter though, Xcode usually figures out the include paths for you and makes a mess of them no matter what. ;)

I updated the iphonestatic.sh script to just build a complete directory that is ready to be copied into your project. I think I also fixed the bugs I was referring to in my previous post. So I would recommend updating and building again.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: Installation trouble with xcode

Postby Paul10 » Sat Jul 31, 2010 4:51 pm

Thanks. I'll try building again. Looking forward to coding with Chipmunk
Paul10
 
Posts: 17
Joined: Sat Jul 31, 2010 8:27 am

Re: Installation trouble with xcode

Postby Paul10 » Sun Aug 01, 2010 10:38 am

Paul10
 
Posts: 17
Joined: Sat Jul 31, 2010 8:27 am

Re: Installation trouble with xcode

Postby slembcke » Sun Aug 01, 2010 12:11 pm

You mean space->activeShapes was NULL or it had no shapes in it?
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: Installation trouble with xcode

Postby Paul10 » Sun Aug 01, 2010 2:20 pm

Sorry...wasn't Null, but had no shapes in it. What was strange is that there was a shape in the space->staticShapes.
Paul10
 
Posts: 17
Joined: Sat Jul 31, 2010 8:27 am


Return to Chipmunk2D Physics

Who is online

Users browsing this forum: No registered users and 1 guest

cron