码迷,mamicode.com
首页 > 移动开发 > 详细

Quick_Cocos2d_x V3.3 Protobuf Android

时间:2015-09-01 18:38:18      阅读:240      评论:0      收藏:0      [点我收藏+]

标签:

ios集成protobuf之后,调用pro.android/build_native.sh 生成android工程的时候会出现

jni/../../Classes/AppDelegate.cpp:125: error: undefined reference to ‘luaopen_protobuf_c‘

clang++: error: linker command failed with exit code 1 (use -v to see invocation)

make: *** [obj/local/armeabi/libcocos2dlua.so] Error 1

这时要修改 Android.mk文件,

define copy-pbc-file-name

$(patsubst jni/%,%, $(shell find $(LOCAL_PATH)/../../Classes/pbc $(LOCAL_PATH)/../../Classes/binding/lua -name "*.c"))

endef


LOCAL_SRC_FILES := hellolua/main.cpp \

../../Classes/VisibleRect.cpp \

../../Classes/AppDelegate.cpp \

../../Classes/ConfigParser.cpp \

$(call copy-pbc-file-name)



LOCAL_C_INCLUDES := \

$(LOCAL_PATH)/../../Classes/runtime \

$(LOCAL_PATH)/../../Classes \

$(COCOS2DX_ROOT)/external \

$(COCOS2DX_ROOT)/external/protobuf-lite/src \

$(LOCAL_PATH)/../../Classes/quick-src \

$(LOCAL_PATH)/../../Classes/quick-src/extra \

$(LOCAL_PATH)/../../Classes/pbc

之后成功调用 pro.android/build_native.sh 生成android工程

[armeabi] Install        : libcocos2dlua.so => libs/armeabi/libcocos2dlua.so


Quick_Cocos2d_x V3.3 Protobuf Android

标签:

原文地址:http://my.oschina.net/u/1582495/blog/500270

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!