Page 1 of 1

inclusion troubles

Posted: Mon Aug 03, 2009 8:07 pm
by hemmi
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.

Re: inclusion troubles

Posted: Tue Aug 04, 2009 7:55 am
by slembcke
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?

Re: inclusion troubles

Posted: Tue Aug 04, 2009 10:33 pm
by hemmi
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!

Re: inclusion troubles

Posted: Wed Aug 05, 2009 8:03 am
by slembcke
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.