何为Android NDK 11编译Boost 1.61"/>
android编译boost,如何为Android NDK 11编译Boost 1.61
构建boost_1_62_0为Android-21 Windows64下这些页面。
假设NDK安装到C:\Programs\Android\sdk\ndk-bundle并提升c:\boost_1_62_0。
安装在mingw提示构建工具(像这样):
$ pacman -S gcc binutils
在C:\boost_1_62_0\这样的文本内容创建android.clang.jam文件:
import os ;
local AndroidNDKRoot = C:/Programs/Android/sdk/ndk-bundle ;
using clang : android
:
C:/Programs/Android/toolchain21/bin/clang++
:
-fexceptions
-frtti
-fpic
-ffunction-sections
-funwind-tables
-Wno-psabi
-march=armv7-a
-mfloat-abi=softfp
-mfpu=vfpv3-d16
-fomit-frame-pointer
-fno-strict-aliasing
-finline-limit=64
-I$(AndroidNDKRoot)/platforms/android-21/arch-arm/usr/include
-Wa,--noexecstack
-DANDROID
-D__ANDROID__
-DNDEBUG
-O2
#-g
-I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.9/include
-I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include
arm
-fvisibility=hidden
-fvisibility-inlines-hidden
-fdata-sections
-D__arm__
-D_REENTRANT
-D_GLIBCXX__PTHREADS
;
明暗提示的设置提升:
$ export NDK=/c/Programs/Android/sdk/ndk-bundle
$ echo ensure msi-installed Python is on path (not msys version):
$ export PATH=/c/Python27:$PATH
$ $NDK/build/tools/make_standalone_toolchain.py --arch arm --api 21 --install-dir /c/Programs/Android/toolchain21
$ ./bootstrap.sh --with-toolset=gcc
$ ./b2 --user-config=android.clang.jam threading=multi link=static \
runtime-link=static toolset=clang-android target-os=linux \
threadapi=pthread --stagedir=android --with-chrono \
--with-program_options --with-system --with-thread --with-random \
--with-regex
更多推荐
android编译boost,如何为Android NDK 11编译Boost 1.61
发布评论