compile boost 1.54 with android-ndk-r9(gcc-4.8)

本文根据一下链接改编:

http://mytestwd12.duapp.com/archives/280205.html

android NDK下 引用BOOST 也需要用NDK编译BOOST才可以 。
第一步 先生成BOOSTB2文件 这个和之前用的普通的没区别 ./bootstrap.sh
第二步 修改boost/tools/build/v2/user-config.jam 文件 内容改成如下:

import os ;

 

if [ os.name ] = CYGWIN || [ os.name ] = NT {

androidPlatform = windows ;

}

else if [ os.name ] = LINUX {

androidPlatform = linux-x86 ;

}

else if [ os.name ] = MACOSX {

androidPlatform = darwin-x86 ;

}

 

modules.poke : NO_BZIP2 : 1 ;

NDK_ROOT = /home/yourhome/java-ndk/android-ndk-r9 ; #这个地方写你的NDK路径

using gcc : android4.8 : $(NDK_ROOT)/toolchains/arm-linux-androideabi-4.8/prebuilt/$(androidPlatform)/bin/arm-linux-androideabi-g++ :

<archiver>$(NDK_ROOT)/toolchains/arm-linux-androideabi-4.8/prebuilt/$(androidPlatform)/bin/arm-linux-androideabi-ar

<ranlib>$(NDK_ROOT)/toolchains/arm-linux-androideabi-4.8/prebuilt/$(androidPlatform)/bin/arm-linux-androideabi-ranlib

<compileflags>–sysroot=$(NDK_ROOT)/platforms/android-9/arch-arm

<compileflags>-I$(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/include

<compileflags>-I$(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/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

;

 

第三步
./b2 –without-python –without-mpi –without-serialization toolset=gcc-android4.6 link=static runtime-link=static target-os=linux –stagedir=android
这样就在你的BOOST目录下面生成了android文件夹 里面就是 lib静态库 然后在项目中就可以引用了

以上环境是在 ubuntu-12.04 x86_64下面实验过

  1. I am quite appreciated for this site. Its an insightful subject. It support me really a lot to resolve some troubles. Its prospect are so fantastic and operating style so speedy. I feel it could be support all of you.

  2. I have presently been examinating away some of your tales and it’s quite superb stuff. I will certainly bookmark your weblog.

  3. I couldn’t resist commenting, Many thanks a whole lot for sharing!

  4. Variants of affordable louboutins banker may possibly be fabricated toe or conceivably accessible bottom, bankrupt to arise back, bung to arise aback or accessible up back. Appropriately brides in actuality who rarely use heels conceivably christian louboutin penis pumps, appetite to beacon ablaze of heels which are in actuality a lot added than A FEW inches as able-bodied as amazingly slim. Instead, admission marriage action shoes which may admission a babe heel or possibly a hardly boxlike heel for authoritative accepting all-around easier.
    cheapest wholesale jerseys http://www.ioniacounty.org/images/icons/readme.aspx?6

  5. Maybe we are are all too “clickcentric”. Most traditional (ie. print) advertising is for building awareness. In print, you have no idea how many people have read your ad. Does this stop them from advertising? No. If you build a campaign around awareness, your other marketing tools will be enhanced.
    cheap canada goose chilliwack bomber http://www.okaysale8.com/canada-goose-chilliwack-bomber/

  6. Wow! Thank you! I always wanted to write on my blog something like that. Can I take a part of your post to my blog?
    vikings houston texans womens red jersey http://classcoupon.com/report.aspx?9

    • seo
    • Oct 22nd. 2013 3:40pm

    Hello Web Admin, I noticed that your On-Page SEO is is missing a few factors, for one you do not use all three H tags in your post, also I notice that you are not using bold or italics properly in your SEO optimization. On-Page SEO means more now than ever since the new Google update: Panda. No longer are backlinks and simply pinging or sending out a RSS feed the key to getting Google PageRank or Alexa Rankings, You now NEED On-Page SEO. So what is good On-Page SEO?First your keyword must appear in the title.Then it must appear in the URL.You have to optimize your keyword and make sure that it has a nice keyword density of 3-5% in your article with relevant LSI (Latent Semantic Indexing). Then you should spread all H1,H2,H3 tags in your article.Your Keyword should appear in your first paragraph and in the last sentence of the page. You should have relevant usage of Bold and italics of your keyword.There should be one internal link to a page on your blog and you should have one image with an alt tag that has your keyword….wait there’s even more Now what if i told you there was a simple WordPress plugin that does all the On-Page SEO, and automatically for you? That’s right AUTOMATICALLY, just watch this 4minute video for more information at. Seo Plugin

  1. No trackbacks yet.