云南省建设厅网站处长,北大学风建设网站,做网站对公司的作用,制作网站专业公司吗下载boost源码
在官网下载指定版本的源码 http://www.boost.org/users/history/
编译boost源码
1.进入源码目录执行./bootstrap.sh生成编译工具
2.编辑project-config.jam文件,替换如下内容
# define platform name of ndk
import os ;
if [ os.name ] CYGWIN || [ os.na…下载boost源码
在官网下载指定版本的源码 http://www.boost.org/users/history/
编译boost源码
1.进入源码目录执行./bootstrap.sh生成编译工具
2.编辑project-config.jam文件,替换如下内容
# define platform name of ndk
import os ;
if [ os.name ] CYGWIN || [ os.name ] NT
{androidPlatform windows-x86_64 ;
}
else if [ os.name ] LINUX
{androidPlatform linux-x86_64 ;
}
else if [ os.name ] MACOSX
{androidPlatform darwin-x86 ;
}# replace with your own ndk path.eg:/usr/ndk/android-ndk-r12b
ANDROID_NDK /path/to/your/dnk ;# compile with gcc, you can change compiler to clang or others
using gcc : android4.9 : $(ANDROID_NDK)/toolchains/arm-linux-androideabi-4.9/prebuilt/$(androidPlatform)/bin/arm-linux-androideabi-g :
archiver$(ANDROID_NDK)/toolchains/arm-linux-androideabi-4.9/prebuilt/$(androidPlatform)/bin/arm-linux-androideabi-ar
ranlib$(ANDROID_NDK)/toolchains/arm-linux-androideabi-4.9/prebuilt/$(androidPlatform)/bin/arm-linux-androideabi-ranlib
compileflags-I$(ANDROID_NDK)/platforms/android-21/arch-arm/usr/include
compileflags-I$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc/4.9/include
compileflags-I$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc/4.9/include/backward
compileflags-I$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc/4.9/libs/armeabi-v7a/include
compileflags-fexceptions
compileflags-frtti
compileflags-fpic
compileflags-ffunction-sections
compileflags-funwind-tables
compileflags-D__ARM_ARCH_5__
compileflags-D__ARM_ARCH_5T__
compileflags-D__ARM_ARCH_5E__
compileflags-D__ARM_ARCH_5TE__
compileflags-D__ARM_ARCH_7__
compileflags-D__ARM_ARCH_7A__
compileflags-Wno-psabi
compileflags-marcharmv7-a
compileflags-mtunexscale
compileflags-mfloat-abisoftfp
compileflags-marm
compileflags-mthumb
compileflags-Os
compileflags-stdgnu11
compileflags-fomit-frame-pointer
compileflags-fno-strict-aliasing
compileflags-finline-limit64
compileflags-Wa,--noexecstack
compileflags-DANDROID
compileflags-D__ANDROID__
compileflags-D__ARM_EABI__
compileflags-DNDEBUG
compileflags-O2
compileflags-g
;# project default compiler
project : default-build toolsetgcc-android4.9 ;# replace with libraries you wanna to build
libraries --with-container --with-coroutine --with-fiber --with-graph --with-graph_parallel --with-log --with-metaparse --with-python --with-test --with-type_erasure --with-atomic --with-date_time --with-program_options --with-chrono --with-context --with-iostreams --with-locale --with-mpi --with-serialization --with-signals --with-timer --with-wave --with-math --with-random --with-exception --with-filesystem --with-thread --with-system --with-regex --with-program_options 3、执行以下命令 ./b2 toolsetgcc-android4.9 linkstatic threadingmulti target-oslinux --stagedirandroid_build toolset表示指定编译工具,link表示编译成静态库,threading表示使用多线程编译,–stagedir表示指定编译文件生成目录名 4、将编译好的boost库放到指定文件夹下便于引用 sudo ./b2 install --prefix/your/path/to/install eg: sudo ./b2 install --prefix/usr/boost/android_boost 这样在使用的时候可以将该路径加入到你的代码中去查找相关的库等。
参考https://github.com/teamarkstudio/boost_for_android