1

这是我的构建环境

Ubuntu 14.04 LTS
Android NDK r10d
Android SDK API 21 SDK Platporm, build-tools 20

但是,当我建立scons TARGET_OS=android TARGET_ARCH=armeabi

他们在建筑物上抛出异常

Archiving out/android/armeabi/release/resource/csdk/security/libocsrm.a
Indexing Archive out/android/armeabi/release/resource/csdk/security/libocsrm.a
Install file: "out/android/armeabi/release/resource/csdk/security/libocsrm.a" as "out/android/armeabi/release/libocsrm.a"
Linking out/android/armeabi/release/resource/csdk/liboctbstack.so
out/android/armeabi/release/resource/csdk/stack/src/ocpayloadparse.os:ocpayloadparse.c:function OCParseStringLL: error: undefined reference to '_cbor_value_dup_string'
out/android/armeabi/release/resource/csdk/stack/src/ocpayloadparse.os:ocpayloadparse.c:function OCParseSingleRepPayload: error: undefined reference to '_cbor_value_dup_string'
out/android/armeabi/release/resource/csdk/stack/src/ocpayloadparse.os:ocpayloadparse.c:function OCParseSingleRepPayload: error: undefined reference to '_cbor_value_dup_string'
out/android/armeabi/release/resource/csdk/stack/src/ocpayloadparse.os:ocpayloadparse.c:function OCParseSingleRepPayload: error: undefined reference to '_cbor_value_dup_string'
collect2: error: ld returned 1 exit status
scons: *** [out/android/armeabi/release/resource/csdk/liboctbstack.so] Error 1
scons: building terminated because of errors.

我不知道该怎么办,我该如何解决?

4

1 回答 1

1

在文件 tinycbor/SConscript 中添加一行

cbor_src = [

...

os.path.join(cborDir, 'src/cborparser_dup_string.c'), <- 添加这一行

于 2016-07-27T21:04:10.690 回答