Compile++ thumb  : game_shared <= main.cpp 
jni/hellocpp/main.cpp: In function 'void Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit(JNIEnv*, jobject, jint, jint)': 
jni/hellocpp/main.cpp:25:10: error: 'CCDirector' has not been declared 
jni/hellocpp/main.cpp:27:9: error: 'CCEGLView' was not declared in this scope 
jni/hellocpp/main.cpp:27:20: error: 'view' was not declared in this scope 
jni/hellocpp/main.cpp:27:27: error: 'CCEGLView' is not a class or namespace 
jni/hellocpp/main.cpp:35:20: error: 'ccDrawInit' was not declared in this scope 
jni/hellocpp/main.cpp:36:34: error: 'ccGLInvalidateStateCache' was not declared in this scope 
jni/hellocpp/main.cpp:38:9: error: 'CCShaderCache' has not been declared 
jni/hellocpp/main.cpp:39:9: error: 'CCTextureCache' has not been declared 
jni/hellocpp/main.cpp:40:9: error: 'CCNotificationCenter' has not been declared 
jni/hellocpp/main.cpp:40:76: error: 'EVNET_COME_TO_FOREGROUND' was not declared in this scope 
jni/hellocpp/main.cpp:41:9: error: 'CCDirector' has not been declared 
/cygdrive/e/android/NDK/android-ndk-r8e-windows-x86/android-ndk-r8e/build/core/build-binary.mk:272: recipe for target `obj/local/armeabi/objs/game_shared/hellocpp/main.o' failed 
make: *** [obj/local/armeabi/objs/game_shared/hellocpp/main.o] Error 1 
make: 离开目录“/cygdrive/d/MyCoder/trunk/cocos2d-x/cocos2d-2.1rc0-x-2.1.2-hotfix/cocos2d-2.1rc0-x-2.1.2/testpppp/proj.android”

编译时,由于在main.cpp中删除了 #include "HelloWorldScene.h",导致没有包含#include "cocos2d.h"而出上述的错误。

则直接在main.cpp中加入#include "cocos2d.h"即可。

编译是报error: 'EVNET_COME_TO_FOREGROUND' was not declared in this scope的更多相关文章

  1. 解决Cygwin编译cocos2dx 遇到的 error: 'UINT64_C' was not declared in this scope 问题

    环境工具:Win10.VS2013.cocos2d-x-2.2.6.Cygwin.ADT 问题来源:写了一个小游戏,VS2013上运行成功,就尝试着打包apk,项目导入到ADT里面,添加了cocos2 ...

  2. ubuntu 编译C++ error: ‘syscall’ was not declared in this scope

    明明已经加了头文件 #include <sys/syscall.h> #include <sched.h> #include <sys/resource.h> 编译 ...

  3. android stdio 编译项目报Error:Failed to find target with hash string 'android-24

    android stdio 编译项目报Error:Failed to find target with hash string 'android-24 查看已有的SDK 设置项目的sdk为 25 an ...

  4. 调用ffmpeg库编译时出现common.h:175:47: error: 'UINT64_C' was not declared in this scope

    解决办法 出现错误:jni/ffmpeg/libavutil/common.h:175:47: error: 'UINT64_C' was not declared in this scope 解决: ...

  5. error: 'LOGE' was not declared in this scope

    移植了下HAL,发现编译出现如下错误 error: 'LOGE' was not declared in this scope 比较了一下android4.1的 system/core/include ...

  6. 【QT】error: 'SIGNAL' was not declared in this scope

    error: 'SIGNAL' was not declared in this scope  未在此范围内声明. connect(ui->Btnshowhello,SIGNAL(clicked ...

  7. In function 'int av_clipl_int32_c(int64_t)': error: 'UINT64_C' was not declared in this scope

    cygwin下使用ndk编译jni时遇到的错误: /ffmpeg/include/libavutil/common.h: In function 'int av_clipl_int32_c(int64 ...

  8. error: ‘errno’ was not declared in this scope

    问题: 将一个c文件改为cpp文件,其中的perror()改用C++中的std::cerr << strerror(error) << std::endl;来替换. 重新编译文 ...

  9. error: ‘to_string’ was not declared in this scope

    错误: error: ‘to_string’ was not declared in this scope 原因: to_string是C++11引入的新功能,旧版本编译器可能不支持它,所以要给编译器 ...

随机推荐

  1. Java集合——HashMap、HashTable以及ConCurrentHashMap异同比较

    0. 前言 HashMap和HashTable的区别一种比较简单的回答是: (1)HashMap是非线程安全的,HashTable是线程安全的. (2)HashMap的键和值都允许有null存在,而H ...

  2. Mysql自己主动备份

    Mysql自己主动备份 批处理命令: set"Ymd=%date:~,4%%date:~5,2%%date:~8,2%" set"hMs=%time:~,2%%time: ...

  3. 算法笔记_112:第五届蓝桥杯软件类省赛真题(Java本科B组)试题解答

     目录 1 武功秘籍 2 切面条 3 猜字母 4 大衍数列 5 圆周率 6 奇怪的分式 7 扑克序列 8 分糖果 9 地宫取宝 10 矩阵翻硬币   前言:以下试题解答代码部分仅供参考,若有不当之处, ...

  4. 算法笔记_181:历届试题 回文数字(Java)

    目录 1 问题描述 2 解决方案   1 问题描述 问题描述 观察数字:12321,123321 都有一个共同的特征,无论从左到右读还是从右向左读,都是相同的.这样的数字叫做:回文数字. 本题要求你找 ...

  5. 基于jquery的锚点滚动插件(百度百科效果) anchorScroll.js

    1.插进使用场景 请打开https://baike.baidu.com/item/%E6%97%A5%E6%9C%AC%E5%8A%A8%E7%94%BB#hotspotmining,查看百度百科页面 ...

  6. 〖Ruby〗Ruby运算符/优先级

    优先级 能否重写 运行符 描述 最高 Y [] []= 数组下标 数组元素赋值 Y ** 冥乘 Y ! ~ + - 非 位非 一元加 负号 Y * / % 乘 除 模 Y + - 加 减 Y > ...

  7. Redis学习(4)-数据类型,string,hash

    Redis数据类型: redis使用键值对保存数据 key:全部是字符串 value:五种数据类型:string,hash,List,Set,有序的Set集合. key命名:自定义,名字不要过长,否则 ...

  8. JQuery 在线参考手册

    官方JQuery API  http://api.jquery.com/ 在线参考手册    http://www.w3school.com.cn/jquery/index.asp 在线参考手册1   ...

  9. MSSQL-SQL SERVER还原与备份(导入与导出)

    备份: 使用Microsoft SQL Server Management Studio查询出想要的列和结果, 在结果处左上角点击, 软件会自动选中查询出的所有结果, 然后右键"将结果另存为 ...

  10. ubuntu发热问题的解决——显卡驱动的安装

    为了支持自由软件事业,本人作出了“一生中最有意义“的决定:将工作环境从Windows转移到Linux中来!于是装上了ubuntu-10.10,但是用了一小段时间后发现本本发热超大,于是Google百度 ...