【发布时间】:2011-03-22 12:48:38
【问题描述】:
我正在关注教程http://www.bit-101.com/blog/?p=2115。在本教程中,我找到了一个项目模板并通过它开始。
我已经下载了cocos2d-iphone-0.99.1 添加子目录 cocos2d 进行项目......但是当我构建时,我得到了 9 个错误和 4 个警告
Scene.h:没有这样的文件或目录 Director' undeclared (第一次使用在 这个功能) /Volumes/Jobed/cocos2d/CCTexture2D.m:79:24: 错误:FontManager.h:没有这样的文件或 目录 /Volumes/Jobed/cocos2d/CCTexture2D.m:80:35: 错误:FontLabelStringDrawing.h:否 这样的文件或目录 /Volumes/Jobed/cocos2d/CCTexture2D.m: 在函数'-[CCTexture2D(Text) initWithString:fontName:fontSize:]‘: /Volumes/Jobed/cocos2d/CCTexture2D.m:519: 错误:“ZFont”未声明(首次使用 在这个函数中) /Volumes/Jobed/cocos2d/CCTexture2D.m:519: 错误:(每个未声明的标识符都是 只报过一次 /Volumes/Jobed/cocos2d/CCTexture2D.m:519: 错误:对于它出现的每个功能 在。) /Volumes/Jobed/cocos2d/CCTexture2D.m:519: 错误:“zFont”未声明(首次使用 在这个函数中) /Volumes/Jobed/cocos2d/CCTexture2D.m:519: 错误:“FontManager”未声明(首先 在这个函数中使用) /Volumes/Jobed/cocos2d/CCTexture2D.m:521: 警告:“NSString”可能不会响应 '-sizeWithZFont:' /Volumes/Jobed/cocos2d/CCTexture2D.m:521: 警告:(没有匹配的消息 方法签名 /Volumes/Jobed/cocos2d/CCTexture2D.m:521: 警告:将假定返回 ‘id’并接受 /Volumes/Jobed/cocos2d/CCTexture2D.m:521: 警告:“……”作为参数。) /Volumes/Jobed/cocos2d/CCTexture2D.m:521: 错误:不兼容的类型 任务 /Volumes/Jobed/cocos2d/CCTexture2D.m: 在函数'-[CCTexture2D(Text) initWithString:dimensions:alignment:fontName:fontSize:]‘: /Volumes/Jobed/cocos2d/CCTexture2D.m:567: 错误:“FontManager”未声明(首先 在这个函数中使用) /Volumes/Jobed/cocos2d/CCTexture2D.m:569: 警告:“NSString”可能不会响应 '-drawInRect:withZFont:lineBreakMode:alignment:'
等等……为什么?
【问题讨论】:
标签: iphone objective-c cocos2d-iphone