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

  • 相关阅读:
    Linux下安装软件遇见的问题汇总
    使用AlarmManager定期执行工作
    android打开文件、保存对话框、创建新文件夹对话框(转载)
    一些算法的整理
    安卓adb调试命令常见的问题
    java下的串口通信-RXTX
    Unity 协程运行时的监控和优化
    Unity3D 协程的介绍和使用
    游戏服务器:到底使用UDP还是TCP
    Unity 可重复随机数
  • 原文地址:https://www.cnblogs.com/yuan19/p/3362560.html
Copyright © 2011-2022 走看看