我有问题移植并使用Android-ndk-r5b将boost库链接到android.我首先使用以下步骤构建boost库(没有mpi,python):
# if [ os.name ] = "NT" { api = win32 ; }
androidNDKRoot = ../android-ndk-r5b ;
using gcc : android4.4.3 : $(androidNDKRoot)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-g++.exe :
--sysroot=$(androidNDKRoot)/platforms/android-3/arch-arm
-mthumb
-Os
-fno-strict-aliasing
-O2
-DNDEBUG
-g
-fexceptions
-frtti
-lstdc++
-I$(androidNDKRoot)/sources/cxx-stl/gnu-libstdc++/include
-I$(androidNDKRoot)/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include
-D__GLIBC__
-DBOOST_NO_INTRINSIC_WCHAR_T
$(androidNDKRoot)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-ar.exe
$(androidNDKRoot)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-ranlib.exe
linux
;
bjam.exe --user-config=user-config.jam --without-python --without-mpi toolset=gcc-android4.4.3 link=static runtime-link=static target-os=linux --stagedir=android > d:\out.txt
APP_STL := gnustl_static APP_PLATFORM := android-3 APP_CPPFLAGS += -mthumb APP_CPPFLAGS += -Os APP_CPPFLAGS += -fno-strict-aliasing APP_CPPFLAGS += -O2 APP_CPPFLAGS += -DNDEBUG APP_CPPFLAGS …