inclusion troubles

Discuss any Chipmunk bugs here.

inclusion troubles

Postby hemmi » Mon Aug 03, 2009 8:07 pm

hey guys, i'm trying to compile chipmunk into my iphone project. i've got the source files in a chipmunk directory, and i'm running into this: http://pastebin.com/m948970d

i only get the errors however when i include chipmunk.h in BSMusicule.h, not BSMaestro.h or both. any idea what's going on here? thanks! i'm not using *any* chipmunk functions or data types yet in my implementation or anywhere else.
hemmi
 
Posts: 10
Joined: Sat Jul 18, 2009 9:39 pm

Re: inclusion troubles

Postby slembcke » Tue Aug 04, 2009 7:55 am

Not really sure, I've never seen that error before. What compiler are you using and have you double checked that there aren't any errors in one of the other header files?
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: inclusion troubles

Postby hemmi » Tue Aug 04, 2009 10:33 pm

turns out the problem was stdlib.h

chipmunk_types.h uses size_t for cpHashValue, but stdlib wasn't being included. right now i've added it to chipmunk_types.h, should i be including it somewhere else instead? is this just a bug and most people include stdlib anyways so it doesn't get noticed, or is there a programmatic reason it isn't included? i'm fascinated now. thanks!
hemmi
 
Posts: 10
Joined: Sat Jul 18, 2009 9:39 pm

Re: inclusion troubles

Postby slembcke » Wed Aug 05, 2009 8:03 am

Hmm, I forgot about that. I was told that using size_t was the best way to get 32/64bit support working correctly across different compilers and systems. Neither int or long are dependably native integer sized. If anybody else has a different suggestion, I'm all ears.
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


Return to Bugs

Who is online

Users browsing this forum: No registered users and 0 guests