zoukankan      html  css  js  c++  java
  • 编译是报error: 'EVNET_COME_TO_FOREGROUND' was not declared in this scope

    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"即可。

  • 相关阅读:
    html5——渐变
    html5——背景
    html5——边框
    html5——私有前缀
    html5——盒子模式
    html5——文本阴影
    html5——颜色
    html5——css选择器
    html5——DOM扩展
    html5——多媒体(一)
  • 原文地址:https://www.cnblogs.com/DswCnblog/p/4057879.html
Copyright © 2011-2022 走看看