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. 配置zip版本的Tomcat启动

    1.配置jdk 2.CATALINA_HOME=c:\tomcat CATALINA_BASE=c:\tomcat 3.classpath=%CATALINA_HOME%\common\lib\ser ...

  2. ubuntu终止进程的方法

    在ubuntu中,终止一个进程或终止一个正在运行的程序,一般是通过 kill .killall.pkill.xkill 等进行. 先看两个例子: 例子一:结束某个程序,如Firefox  键入命令: ...

  3. tensorflow serving 打印调试log

    启动时添加环境变量 export TF_CPP_MIN_VLOG_LEVEL=1 ,这样可以打印VLOG(1)的log

  4. 基于CUDA的粒子系统的实现

    基于CUDA的粒子系统的实现 用途: 这篇文章作为代码实现的先导手册,以全局的方式概览一下粒子系统的实现大纲. 科普: 对粒子进行模拟有两种基本方法: Eulerian(grid-based) met ...

  5. windows2003密码忘记了该如何处理

    如果你有sql   server的管理员帐号,并且可以登录,尝试用下面的方法:         --用管理员连接sql,在查询分析器中执行:         --添加用户     exec   mas ...

  6. JSTL中c:forEach循环里的值的substr操作及对String操作的常用API

    <c:forEach items="${dataList}" var="item" varStatus="itemStatus"> ...

  7. try/except/else语句

    # -*- coding: utf-8 -*- #python 27 #xiaodeng #Python学习手册 868 #try/except/else语句 #try语句分句形式 except: # ...

  8. TransactionScope 的基本原理简介

    C# 的事务编程 1 Db事务 DbConnection 中创建基于当前连接的 DbTransaction 2  使用TransactionScope ,创建环境事务 一旦创建,在这个环境包含的DbC ...

  9. Maven学习笔记(二) :Maven的安装与配置

    在Windows上安装Maven:    1.  首先检查安装JDK 通过命令行运行命令:echo %JAVA_HOME%和 java  -version,能够查看当前java的安装文件夹及java的 ...

  10. jquery中的replaceWith()和html()的区别

    区别在于,html()会替换指定元素内部的HTML,而replaceWith()会替换元素本身及其内部的HTML. //目标div <div id="myid" /> ...