我想安装编译Boost 1.61与clang 3.6 for android与NDK 11,但是这个软件:https://github.com/moritz-wundke/Boost-for-Android没有更新,不支持这个版本.
我想知道是否有人成功了!
谢谢 !
在 Windows64 下为 Android-21 构建 boost_1_62_0。
假设 NDK 安装到C:\Programs\Android\sdk\ndk-bundle并在c:\boost_1_62_0.
安装 mingw:使用 MSYS2 中的 msys2-x86_64
从 mingw 提示符安装构建工具(类似这样):
$ pacman -S gcc binutils
Run Code Online (Sandbox Code Playgroud)
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++
:
<compileflags>-fexceptions
<compileflags>-frtti
<compileflags>-fpic
<compileflags>-ffunction-sections
<compileflags>-funwind-tables
<compileflags>-Wno-psabi
<compileflags>-march=armv7-a
<compileflags>-mfloat-abi=softfp
<compileflags>-mfpu=vfpv3-d16
<compileflags>-fomit-frame-pointer
<compileflags>-fno-strict-aliasing
<compileflags>-finline-limit=64
<compileflags>-I$(AndroidNDKRoot)/platforms/android-21/arch-arm/usr/include
<compileflags>-Wa,--noexecstack
<compileflags>-DANDROID
<compileflags>-D__ANDROID__
<compileflags>-DNDEBUG
<compileflags>-O2
#<compileflags>-g
<compileflags>-I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.9/include
<compileflags>-I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include
<architecture>arm
<compileflags>-fvisibility=hidden
<compileflags>-fvisibility-inlines-hidden
<compileflags>-fdata-sections
<cxxflags>-D__arm__
<cxxflags>-D_REENTRANT
<cxxflags>-D_GLIBCXX__PTHREADS
;
Run Code Online (Sandbox Code Playgroud)
从 mingw 提示符中设置 boost:
$ 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
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6461 次 |
| 最近记录: |