欢迎您来到腾讯云!积分商城

腾讯云腾讯云论坛

 找回密码
 立即注册
忘了密码?

扫一扫,访问微社区

快捷导航
搜索
查看: 798|回复: 1

[已回应] quick-cocos2d项目接入GCloudVoice问题!

[复制链接]

1

主题

0

好友

70

积分

小白[LV1]

Rank: 1

云币
200
威望
70
发表于 2017-5-16 09:23:50 |显示全部楼层

GCloudVoice提供的是cocos的demo,编辑Android.mk,quick-cocos2d已经存在一个Android.mk文件,那应该如何修改Android.mk文件呢?

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := cocos2dlua_shared

LOCAL_MODULE_FILENAME := libcocos2dlua

LOCAL_SRC_FILES := hellolua/main.cpp \
../../../Classes/VisibleRect.cpp \
../../../Classes/AppDelegate.cpp \
../../GCloudVoice/Android/$(TARGET_ARCH_ABI)/libGCloudVoice.so

LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../../../Classes \
$(COCOS2DX_ROOT)/external \
$(COCOS2DX_ROOT)/quick/lib/quick-src \
$(COCOS2DX_ROOT)/quick/lib/quick-src/extra \
$(LOCAL_PATH)/../../GCloudVoice/include

LOCAL_STATIC_LIBRARIES := cocos2d_lua_static
LOCAL_STATIC_LIBRARIES += lua_extensions_static
LOCAL_STATIC_LIBRARIES += extra_static

LOCAL_SHARED_LIBRARIES := libGCloudVoice
上面是Android.mk文件,但一直提示undefined reference to 'GetVoiceEngine',不知道应该在哪加入到libGCloudVoice的引用?

/Users/wenewzhang/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: error: cannot find -latomicc
/Users/wenewzhang/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lGCloudVoice
/Users/wenewzhang/Documents/work2/hnzp/frameworks/runtime-src/proj.android/libcocos2dx/jni/../../../Classes/AppDelegate.cpp:92: error: undefined reference to 'GetVoiceEngine'
/Users/wenewzhang/Documents/work2/hnzp/frameworks/runtime-src/proj.android/libcocos2dx/jni/../../../Classes/AppDelegate.cpp:93: error: undefined reference to 'GetVoiceEngine'
/Users/wenewzhang/Documents/work2/hnzp/frameworks/runtime-src/proj.android/libcocos2dx/jni/../../../Classes/AppDelegate.cpp:94: error: undefined reference to 'tolua_VoiceMessage_open(lua_State*)'
collect2: error: ld returned 1 exit status
make: *** [/Users/wenewzhang/Documents/work2/hnzp/frameworks/runtime-src/proj.android/libcocos2dx/obj/local/armeabi/libcocos2dlua.so] Error 1
Error while building, check error above!

1

主题

0

好友

80

积分

小白[LV1]

Rank: 1

云币
190
威望
80
发表于 2017-9-4 16:01:47 |显示全部楼层
LOCAL_PATH := $(call my-dir)
############## voice #################
include $(CLEAR_VARS)
LOCAL_MODULE := libGCloudVoice
LOCAL_SRC_FILES := ../../GCloudVoice/libs/Android/armeabi/libGCloudVoice.so
include $(PREBUILT_SHARED_LIBRARY)
#######################################
include $(CLEAR_VARS)

LOCAL_MODULE := cocos2dlua_shared

LOCAL_MODULE_FILENAME := libcocos2dlua

LOCAL_SRC_FILES := hellolua/main.cpp \
../../../Classes/VisibleRect.cpp \
../../../Classes/AppDelegate.cpp \
../../GCloudVoice/Android/$(TARGET_ARCH_ABI)/libGCloudVoice.so

LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../../../Classes \
$(COCOS2DX_ROOT)/external \
$(COCOS2DX_ROOT)/quick/lib/quick-src \
$(COCOS2DX_ROOT)/quick/lib/quick-src/extra \
$(LOCAL_PATH)/../../GCloudVoice/include

LOCAL_STATIC_LIBRARIES := cocos2d_lua_static
LOCAL_STATIC_LIBRARIES += lua_extensions_static
LOCAL_STATIC_LIBRARIES += extra_static


# _COCOS_LIB_ANDROID_BEGIN
LOCAL_SHARED_LIBRARIES += libGCloudVoice
# _COCOS_LIB_ANDROID_END
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册
您需要登录后才可以发帖 QQ登录

联系我们|腾讯云平台|积分商城|腾讯云官方论坛    

GMT+8, 2018-2-19 22:11 , Processed in 1.108149 second(s), 28 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部