cocos2d错误 [英] cocos2d error

查看:155
本文介绍了cocos2d错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循教程 http://www.bit-101 .com / blog /?p = 2115.在本教程中,我找到一个项目模板,并开始....

I am following the tutorial http://www.bit-101.com/blog/?p=2115.In this tutorial i found a project template and go through it to begin....

cocos2d-iphone-0.99.1添加子目录
cocos2d到项目...。当我构建了我的错误和4工作

I have downloaded cocos2d-iphone-0.99.1 add the subdirectory cocos2d to project….but when i built i got 9 error and 4 worning


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'undeclared(首先在此函数中使用

/Volumes/Jobed/cocos2d/CCTexture2D.m:519 :
错误:(每个未声明的标识符是
只报告一次
/Volumes/Jobed/cocos2d/CCTexture2D.m:519:
错误:对于每个函数它出现
in。)
/Volumes/Jobed/cocos2d/CCTexture2D.m:519:
错误:'zFont'undeclared(首先在此函数中使用

/ Volumes / Jobed /cocos2d/CCTexture2D.m:519:
error:'FontManager'undeclared(first
use in this function)
/Volumes/Jobed/cocos2d/CCTexture2D.m:521:
警告:'NSString'可能不响应
'-sizeWithZFont:'
/Volumes/Jobed/cocos2d/CCTexture2D.m:521:
warning:(没有匹配的邮件
方法签名
/Volumes/Jobed/cocos2d/CCTexture2D.m:521:
警告:将假定返回
'id'并接受
/ Volumes / Jobed / cocos2d /CCTexture2D.m:521:
warning:'...'作为参数。)
/Volumes/Jobed/cocos2d/CCTexture2D.m:521:
错误:
中不兼容的类型赋值
/Volumes/Jobed/cocos2d/CCTexture2D.m:
在函数' - [CCTexture2D(Text)
initWithString:dimensions:alignment:fontName:fontSize:]':
/Volumes/Jobed/cocos2d/CCTexture2D.m:567:
error:'FontManager'undeclared(first
use in this function)
/Volumes/Jobed/cocos2d/CCTexture2D.m:569 :
警告:'NSString'可能不响应
'-drawInRect:withZFont:lineBreakMode:alignment:'

Scene.h: No such file or directory Director’ undeclared (first use in this function) /Volumes/Jobed/cocos2d/CCTexture2D.m:79:24: error: FontManager.h: No such file or directory /Volumes/Jobed/cocos2d/CCTexture2D.m:80:35: error: FontLabelStringDrawing.h: No such file or directory /Volumes/Jobed/cocos2d/CCTexture2D.m: In function ‘-[CCTexture2D(Text) initWithString:fontName:fontSize:]‘: /Volumes/Jobed/cocos2d/CCTexture2D.m:519: error: ‘ZFont’ undeclared (first use in this function) /Volumes/Jobed/cocos2d/CCTexture2D.m:519: error: (Each undeclared identifier is reported only once /Volumes/Jobed/cocos2d/CCTexture2D.m:519: error: for each function it appears in.) /Volumes/Jobed/cocos2d/CCTexture2D.m:519: error: ‘zFont’ undeclared (first use in this function) /Volumes/Jobed/cocos2d/CCTexture2D.m:519: error: ‘FontManager’ undeclared (first use in this function) /Volumes/Jobed/cocos2d/CCTexture2D.m:521: warning: ‘NSString’ may not respond to ‘-sizeWithZFont:’ /Volumes/Jobed/cocos2d/CCTexture2D.m:521: warning: (Messages without a matching method signature /Volumes/Jobed/cocos2d/CCTexture2D.m:521: warning: will be assumed to return ‘id’ and accept /Volumes/Jobed/cocos2d/CCTexture2D.m:521: warning: ‘…’ as arguments.) /Volumes/Jobed/cocos2d/CCTexture2D.m:521: error: incompatible types in assignment /Volumes/Jobed/cocos2d/CCTexture2D.m: In function ‘-[CCTexture2D(Text) initWithString:dimensions:alignment:fontName:fontSize:]‘: /Volumes/Jobed/cocos2d/CCTexture2D.m:567: error: ‘FontManager’ undeclared (first use in this function) /Volumes/Jobed/cocos2d/CCTexture2D.m:569: warning: ‘NSString’ may not respond to ‘-drawInRect:withZFont:lineBreakMode:alignment:’

etc ...。我不知道为什么...我是新的可以帮助

etc….i don’t know why…i am new can help??

推荐答案

稍后cocos2d更名所有的类。他们现在都从CC开始。在上面的例子中,你应该使用CCDirector.h,而不是Director.h

A little while back cocos2d renamed all of their classes. They now all begin with CC. In your above example, you should be using CCDirector.h, not Director.h

查看 cocos2d API 了解详情。

查看在你发布的教程,它看起来像其中包含的信息是有点过时。我想你会发现安装说明特别麻烦。我建议找到一个更好的教程。有几个发布在cocos2d网站上。 这里是有关如何更新的指南安装cocos2d。

After looking at the tutorial you posted, it looks like the information contained within it is a little out of date. I think you'll find the installation instructions especially troublesome. I'd suggest finding a better tutorial. There are several posted on the cocos2d site. Here's a more up to date guide on how to install cocos2d.

编辑:我应该发布了一个链接到 cocos2d编程指南。它包含开始使用时需要了解的所有信息。

I should have posted a link to the cocos2d programming guide directly. It contains all the information you need to know to get started.

这篇关于cocos2d错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆