Cannot create shared object of protobuf with android g++ standalone compiler

I'm trying to compile protobuf with the android arm g++ as a shared object, however the compiler is only outputting static objects. Here's the error in the configure step:

checking whether the /opt/build-android-linux/arm-linux-androideabi-4.4.3/bin/arm-linux-androideabi-g++ linker (/opt/build-android-linux/arm-linux-androideabi-4.4.3/arm-linux-androideabi/bin/ld) supports shared libraries... no

Here's my environment for executing the configure step

export NDK="/home/john/Development/android-ndk-r8e/"

export 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

Thanks in advance

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

上一篇: 为什么proc / cpuinfo仅在我的galaxy S4上显示4个处理器

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