cocos2d-x 头文件中添加方法变量导致编译报错
代码如下:
| HelloWorldScene.h #ifndef __HELLOWORLD_SCENE_H__ #include "cocos2d.h" // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone // a selector callback bool onContactBegin(const PhysicsContact& contact); CREATE_FUNC(HelloWorld); #endif // __HELLOWORLD_SCENE_H__ |
报错:
|
Error 4 error C2061: syntax error : identifier 'Touch' (..\Classes\AppDelegate.cpp) e:\cocos2d-x\samples\hello\classes\helloworldscene.h 19 1 hello |
解决方法:
在行#include "cocos2d.h"下增加如下代码行:
USING_NS_CC;
cocos2d-x 头文件中添加方法变量导致编译报错的更多相关文章
- VS2010在C#头文件中添加文件注释的方法
步骤: 1.VS2010 中找到安装盘符(本人安装目录在D盘,所以以D盘为例)D:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\I ...
- VS2010在C#头文件中添加文件注释的方法(转)
步骤: 1.VS2010 中找到(安装盘符以D盘为例)D:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTempl ...
- Qt - 错误总结 - 在自定义类头文件中添加Q_OBJECT 编译时报错(undefined reference to ‘vtable for xxThread)
错误提示:在添加的QThread子类头文件添加Q_OBJECT时,编译程序,出现"undefined reference to 'vtable for xxThread'"错误提示 ...
- Loadrunner在场景中添加多个负载机报错:Action.c(38): Error -26488: Could not obtain information about submitted解决方法
Error -26488: Could not obtain information about submitted file "E:\.jpg": _stat32 rc=-1, ...
- maven 项目 pom.xml文件中配置的jar包下载报错
[ERROR] [ERROR] Some problems were encountered while processing the POMs:[ERROR] 'dependencies.depen ...
- 解决Mapper.xml文件中sql标签第一个字段报错
在文件标头的http后边补上www 下边代码仅第4行有变动 原文件: <?xml version="1.0" encoding="UTF-8"?> ...
- Java中float浮点型变量不加F报错情况
1 public class Text { 2 3 public static void main(String args[] ){ 4 float x=123.45; 5 System.out.pr ...
- [C/C++]在头文件中使用static定义变量意味着什么
文章出处:http://www.cnblogs.com/zplutor/ 看到有一位同学在头文件中这么写: static const wchar_t* g_str1 = - static const ...
- 【原创】大叔问题定位分享(20)hdfs文件create写入正常,append写入报错
最近在hdfs写文件的时候发现一个问题,create写入正常,append写入报错,每次都能重现,代码示例如下: FileSystem fs = FileSystem.get(conf); Outpu ...
随机推荐
- Android dp和px之间转换 及 获取坐标
dp.px.sp转换 public class DensityUtil { /** * 将px值转换为dip或dp值,保证尺寸大小不变 * * @param pxValue * @param scal ...
- Android 物理按键
import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.view. ...
- 实用bootstrap 表格控件
http://wenzhixin.net.cn/p/bootstrap-table/docs/examples.html
- Android 自定义View (四) 视频音量调控
转载请标明出处:http://blog.csdn.net/lmj623565791/article/details/24529807 今天没事逛eoe,看见有人求助要做一个下面的效果,我看下面一哥们说 ...
- Linux查看代码量
利用find xargs wc可方便的计算出某个目录下源文件的代码量find sourcecode_dir_path -type f -name "*.c" -print0 | ...
- Java – 4 Security Vulnerabilities Related Coding Practices to Avoid---reference
This article represents top 4 security vulnerabilities related coding practice to avoid while you ar ...
- spring07 JDBC
1.创建对应的数据库 2.在MyEclipse中创建项目 引入需要的jar包 3.创建数据访问层 public interface StudentDao { //新增学生 int addStuden ...
- solr官方文档翻译系列之schema.xml配置介绍
常见的元素 <field name="weight" type="float" indexed="true" stored=" ...
- 底层restful接口修改分析
记录接口调用次数,接口调用时间需求. 需要修改公共的类,就是restful接口,可以认为是底层的代码,具体的实现有哪些?插入数据库肯定不能影响性能.
- ASP.net关于C#代码与javaScript函数的相互调用
C#代码与javaScript函数的相互调用 问:1.如何在JavaScript访问C#函数?2.如何在JavaScript访问C#变量?3.如何在C#中访问JavaScript的已有变量?4.如何在 ...