无法使用android g ++独立编译器创建protobuf的共享对象

我试图用android手臂g ++编译protobuf作为共享对象,但编译器只输出静态对象。 以下是配置步骤中的错误:

检查/opt/build-android-linux/arm-linux-androideabi-4.4.3/bin/arm-linux-androideabi-g++链接器(/opt/build-android-linux/arm-linux-androideabi-4.4。 3 / arm-linux-androideabi / bin / ld)支持共享库...不

这是我执行配置步骤的环境

export NDK =“/ home / john / Development / android-ndk-r8e /”

导出SYSROOT = $ NDK / platforms / android-8 / arch-arm

export CFLAGS =“ - march = armv7 -a -mfloat-abi = softfp -DGOOGLE_PROTOBUF_NO_RTTI --sysroot = $ SYSROOT”

export CPPFLAGS =“ - march = armv7 -a -mfloat-abi = softfp -DGOOGLE_PROTOBUF_NO_RTTI --sysroot = $ SYSROOT”androideabi / lib / -lgnustl_shared“

export CC =“/ opt / build-android-linux / arm-linux-androideabi-4.4.3 / bin / arm-linux-androideabi-gcc”

export CXX =“/ opt / build-android-linux / arm-linux-androideabi-4.4.3 / bin / arm-linux-androideabi-g ++”

export AR =“/ opt / build-android-linux / arm-linux-androideabi-4.4.3 / bin / arm-linux-androideabi-ar”

./configure --host = arm-eabi --with-sysroot = $ SYSROOT CC = $ CC --enable-cross-compile --with-protoc = protoc --enable-static = false

提前致谢

链接地址: http://www.djcxy.com/p/85537.html

上一篇: Cannot create shared object of protobuf with android g++ standalone compiler

下一篇: converting double to integer in java