Search code examples
xcode4cocos2d-iphone

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?


Solution

  • 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.