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 ...
- C# 自己定义 implicit和explicit转换
explicit 和 implicit 属于转换运算符,如用这两者能够让我们自己定义的类型支持相互交换explicti 表示显式转换.如从 A -> B 必须进行强制类型转换(B = (B)A) ...
- [Javascript] Advanced Function Scope
Something like 'for' or 'while', 'if', they don't create a new scope: ,,]; ; i < ary.length; i++) ...
- Hibernate的fetch
hibernate抓取策略fetch具体解释一.hibernate抓取策略(单端代理的批量抓取fetch=select(默认)/join)測试用例:Student student = (Student ...
- C# 网络编程之网页简单下载实现
这是根据<C#网络编程实例教程>中学到的知识实现的一个C#网页简单下载器,其中涉及到的知识主要是HTTP协议编程中相关类:HttpWebRequest类.HttpWebResponse类. ...
- [转] thrift的使用介绍
http://gemantic.iteye.com/blog/1199214 一.About thrift 二.什么是thrift,怎么工作? 三.Thrift IDL 四.Thrift ...
- Java基础知识强化70:正则表达式之引入案例(QQ号码校验)
1. 校验QQ号码的案例,如下: package cn.itcast_01; import java.util.Scanner; /* * 校验qq号码. * 1:要求必须是5-15位数字 * 2:0 ...
- linux批量执行工具omnitty使用方法
一.omnitty概述 在生产环境中,可能会有多台linux主机.运维人员可能会对多台主机进行同样的操作,例:同时在多台主机上添加一个user或查看所有主机的硬件信息,如果没有批量操作工具,设备少于2 ...
- SpringMVC09异常处理和类型转化器
public class User { private String name; private Integer age; public String getName() { return name; ...
- SpringMVC05使用注解的方式
<body> <a href="add">新增</a> <a href="update">修改</a> ...