• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

编译lua版本问题

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
LuaCAPI的正确用法发布时间:2022-07-22
下一篇:
Lua入门系列----pil学习笔记之TypeandValues(2)发布时间:2022-07-22
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap