Compilation error in empty cocos2d 2.0 (iPhone)

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

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

The file I checked, what's wrong?

+7
source share
3 answers

This is caused by the presence of a space in the name of the path to your project. To get around this, you need to add the following to your project configuration ... in Build Settings , in the Search Paths group, set the Header Search Paths parameter to the following value:

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

Be sure to include double quotation marks.

+14
source

You checked the Finder to see if there is a real folder named kazmath in the same path as CCNode? if not, there may be an error in the templates installing the script for this version of the coconut. But don't rely on the β€œtree view” of the Xcode project navigator to really know if a file is present or not. If the wrong path is included in the include, suggest that the Coco team report this. You could temporarily fix the import instructions to get started, but that would be an eject code :) when Coco issues another release candidate, supposedly corrected.

+1
source

Make sure you edit the correct header search paths for the correct purpose. 1 hour of my life wasted editing the main project or application, not the test!

Target selector

0
source

All Articles