This is how I fixed the problem. Clearing and re-creating the project was apparently not a good idea for me.
There are several answers on the Internet on this problem, but they did not help me solve this problem. One is on SO in
cassert file not found, but I am using Box2d template and the other is on cocos2d-iphone forum,
http://www.cocos2d-iphone.org/forums/topic/cannot-include-box2d-cassert-file-not-found-despite-every-file-being-mm/
The combination of the two sentences worked for me -
- Rename all YOURS (not cocos2d or box2d files, only your project files) from .m to .mm
- Make sure that on each of the files in the right pane the "Type" parameter is set to "Default - C ++ Source Object"
There was another problem for me, maybe not a problem for you, I used the following signature for CCLabelTTF
CCLabelTTF *title = [CCLabelTTF labelWithString:@"Hello" dimensions:CGSizeMake(720.0f, 880.0f) alignment:UITextAlignmentLeft fontName:@"Arial" fontSize:34];
This is deprecated and caused errors everywhere. Now I am using the following slightly modified version and bug fixes -
CCLabelTTF *title = [CCLabelTTF labelWithString:@"Hello" dimensions:CGSizeMake(720.0f, 880.0f) hAlignment:kCCTextAlignmentRight fontName:@"Arial" fontSize:34];
My latest record of this fix is โโat http://indiangamer.com/how-i-fixed-the-cocos2d-box2d-include-file-not-found-error/
Madhav sbss
source share