Ubuntu用android-ndk-r15c編譯boost_1_65_1

來源:互聯網
上載者:User

標籤:modules   div   config   macosx   sha   shared   .sh   class   ict   

解壓:

unzip android-ndk-r15c-linux-x86_64.zip

unzip boost_1_65_1.zip

cd boost_1_65_1/

./bootstrap.sh

vim tools/build/example/user-config.jam

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 ;  }     modules.poke : NO_BZIP2 : 1 ;  ANDROID_NDK = /path/to/android-ndk-r15c ;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>--sysroot=$(ANDROID_NDK)/platforms/android-9/arch-arm  <compileflags>-I$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/4.9/include  <compileflags>-I$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include  <compileflags>-DNDEBUG  <compileflags>-D__GLIBC__  <compileflags>-DBOOST_FILESYSTEM_VERSION=3  <compileflags>-lstdc++  <compileflags>-lgnustl_shared  <compileflags>-mthumb  <compileflags>-fno-strict-aliasing  <compileflags>-std=gnu++11  <compileflags>-O2;  

cp  tools/build/example/user-config.jam  tools/build/src/

./b2 --with-system --with-serialization toolset=gcc-android4.9 link=static runtime-link=static target-os=linux --stagedir=android

靜態庫就產生在

boost_1_65_1/android/lib檔案夾下

Ubuntu用android-ndk-r15c編譯boost_1_65_1

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.