android编译boost,如何为Android NDK 11编译Boost 1.61

编程入门 行业动态 更新时间:2024-10-24 22:24:06

android编译boost,如<a href=https://www.elefans.com/category/jswz/34/1771179.html style=何为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

本文发布于:2024-02-13 04:26:40,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1690687.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:何为   Android   android   boost   Boost

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!