Ju-v
Ju-v

Reputation: 362

Compile error in empty cocos2d 2.0 (iPhone)

When I try to compile new cocos2d+box2d project in xcode4. I got error message like: /Users/bla-bla/Cocos2d testing/Cocos2d testing/libs/cocos2d/CCDirector.h:32:9: fatal error: 'kazmath/mat4.h' file not found [2]

/Users/bla-bla/Cocos2d testing/Cocos2d testing/libs/cocos2d/CCNode.h:37:9: fatal error: 'kazmath/kazmath.h' file not found [2]

File I checked, what is wrong?

Upvotes: 7

Views: 4617

Answers (3)

Nick
Nick

Reputation: 2911

Ensure you are editing the right header search paths for the right target. 1 hour of my life wasted editing the main project or the app rather than the test!

Target Selector

Upvotes: 0

Michael Fredrickson
Michael Fredrickson

Reputation: 37398

This is caused by having a space in the path name to your project. To work around this, you'll need to add the following under your project's configuration... in Build Settings, in the group of Search Paths, set the Header Search Paths to the following value:

"${SRCROOT}/Cocos2d testing/libs/kazmath/include"

Be sure to include the double-quotes.

Upvotes: 14

YvesLeBorg
YvesLeBorg

Reputation: 9089

did you check in Finder to see if there is a real folder named kazmath in the same path as where CCNode is ? if not, there is probably a flaw in the templates install script for that version of coco. But dont rely on the 'tree view' of the Xcode project navigator to really know whether a file is present or not. If the path is wrong in the include, suggest you report it to the coco team. You could temporarily fix the import statements to get going, but that would be throw-away code :) when coco issues another release candidate, presumably fixed.

Upvotes: 1

Related Questions