Page 1 of 1

xcode n00b question constraints/util.h file not found

Posted: Mon Dec 12, 2011 8:21 pm
by emricht32
I am trying to start developing iphone/ipad apps using chipmunk. I create a new Single view application project. I then drag the chipmunk folder into the BallGame parent folder (copying the files when prompted). Doing so adds:

$(inherited) "$(SRCROOT)/Chipmunk/msvc/glut/lib"

(including quotes) to my library search path. I then add:

$(inherited) "$(SRCROOT)/Chipmunk/include/chipmunk/*"

to the Header Search Paths. I try to build an empty project without adding any code myself and I get constraints/util.h not found. I have done just about every variation I can think of. I've used quotes, and also no quotes. Ive dragged the entire chipmunk folder, Ive tried to add just the src and include folders. I have used $(SRCROOT) and $(SRC_ROOT), I have double/tripple checked the paths. I have some experience with java (I teach a high school intro to Java class) but I started xcode/Obj-C two days ago.

What am I doing wrong?

As I literally just started with this, obviously I am using the latest version of Chipmunk (6.0.2) and I am using xcode 4.2. Also, I have found this error in a few places on the internet and none of the solutions posted elsewhere have worked for me.

Re: xcode n00b question constraints/util.h file not found

Posted: Tue Dec 13, 2011 10:57 am
by slembcke
You don't want to add the entire Chipmunk directory to your project. Look in the macosx/ directory and run the iphonestatic.command or macstatic.command script (double clicking it will run it). That will generate a directory with a static lib and all the headers bundled up in the right way. You can drag that folder into your project without issues and it will be compiled with all the correct compiler flags and such.

If you really want the source in your project (which I don't really recommend), you just want the src/ and include/ directories.

Re: xcode n00b question constraints/util.h file not found

Posted: Tue Dec 13, 2011 8:03 pm
by emricht32
slembcke wrote:You don't want to add the entire Chipmunk directory to your project. Look in the macosx/ directory and run the iphonestatic.command or macstatic.command script (double clicking it will run it). That will generate a directory with a static lib and all the headers bundled up in the right way. You can drag that folder into your project without issues and it will be compiled with all the correct compiler flags and such.

If you really want the source in your project (which I don't really recommend), you just want the src/ and include/ directories.

Thanks. I did just that and for the mac OS SDK it worked just fine however I get and empty folder for the iOS script and I get an error in the terminal that is saying that it cant find iOS 4.3 SDK. Im using iOS 5 SDK as I just downloaded it. Any more thoughts on this? I know I cant just download iOS 5 SDK (its part of the new xcode package) but i havent looked for iOS 4.3 SDK. Can I just edit the script to say 5.0 instead of 4.3? I cant imagine it could be that easy but not knowing anything about how this is put together I figured I should run it by someone before I did that.

Re: xcode n00b question constraints/util.h file not found

Posted: Tue Dec 13, 2011 9:45 pm
by emricht32
emricht32 wrote:
slembcke wrote:You don't want to add the entire Chipmunk directory to your project. Look in the macosx/ directory and run the iphonestatic.command or macstatic.command script (double clicking it will run it). That will generate a directory with a static lib and all the headers bundled up in the right way. You can drag that folder into your project without issues and it will be compiled with all the correct compiler flags and such.

If you really want the source in your project (which I don't really recommend), you just want the src/ and include/ directories.

Thanks. I did just that and for the mac OS SDK it worked just fine however I get and empty folder for the iOS script and I get an error in the terminal that is saying that it cant find iOS 4.3 SDK. Im using iOS 5 SDK as I just downloaded it. Any more thoughts on this? I know I cant just download iOS 5 SDK (its part of the new xcode package) but i havent looked for iOS 4.3 SDK. Can I just edit the script to say 5.0 instead of 4.3? I cant imagine it could be that easy but not knowing anything about how this is put together I figured I should run it by someone before I did that.
Never mind, I just changed it to 5.0 and it worked. Thanks again.