zoukankan      html  css  js  c++  java
  • 编译lua版本问题

    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”

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

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

  • 相关阅读:
    细说 webpack 之流程篇
    git 撤销commit
    Git远程操作详解
    git Could not read from remote repository 解决
    Mysql 关键字及保留字
    使用 Intellij Idea 导出JavaDoc
    【树莓派】盒子常见问题处理基础帮助
    【树莓派】crontab设置Linux设备定时重启
    【医疗行业】关于dcm4che DICOM Toolkit:C-Move与C-Get
    关于操作系统:eos、deepin
  • 原文地址:https://www.cnblogs.com/yuan19/p/3362560.html
Copyright © 2011-2022 走看看