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. js replace 如何替换字符串中的最后一个匹配项

    1.正则表达时,贪婪模式,.*会一直匹配到最后一个 // 验证 let str = "123[空]345[空]789[空]0"; let res = str.replace(/(. ...

  2. STS 自动生成 getter 和 setter

    1.Source --  Generate Getters and Setters

  3. git查看各个branch之间的关系图

    两种方法: 一.  使用Git log命令 git log --graph --decorate --oneline --simplify-by-decoration --all 说明: --deco ...

  4. js-form表单元素的自定义属性

      form表单元素的自定义属性 CreateTime--2016年9月22日09:03:40 Author:Marydon 场景: <script type="text/javasc ...

  5. java手动加载jar

    @RequestMapping("/testJar") public @ResponseBody String exteriorJar(int ys, int csd,int jg ...

  6. 重叠IO overlapped I/O 运用详解

    2009年02月21日 星期六 下午 07:54 I/O设备处理必然让主程序停下来干等I/O的完成,对这个问题有 方法一:使用另一个线程进行I/O.这个方案可行,但是麻烦.               ...

  7. C#中的Invoke和BeginInvoke

    一.Control#Invoke() 和Control#BeginInvoke() 在非UI线程中调用MessageBox.Show()结果是非模态对话框: 在UI线程中调用MessageBox.Sh ...

  8. Python中 append 和 extend 的区别

    Python中Lists 的两个方法: append 和 extend : list.append(object) 向列表中添加一个对象object.append 接受一个参数,这个参数可以是任何数据 ...

  9. 浅析若干Java序列化工具【转】

    在Java中socket传输数据时,数据类型往往比较难选择.可能要考虑带宽.跨语言.版本的兼容等问题.比较常见的做法有: 采用java对象的序列化和反序列化 把对象包装成JSON字符串传输 Googl ...

  10. $(document).ready(function(){}), $().ready(function(){})和$(function(){})三者区别

    当 DOM(文档对象模型) 已经加载,并且页面(包括图像)已经完全呈现时,会发生 ready 事件.ready() 函数仅能用于当前文档,因此无需选择器.所以document选择器可以不要,那么就可以 ...