Port Boost to Android

后端 未结 3 1171
一整个雨季
一整个雨季 2021-01-31 11:54

Has somebody ported and used Boost on Android?

I\'ve found the tool which builds boost for android (https://github.com/MysticTreeGames/Boost-for-Android), the build is

3条回答
  •  北恋
    北恋 (楼主)
    2021-01-31 12:30

    I just found a easy way to build boost under android NDK, which don't need patching the boost.

    I don't use Android.mk to build boost, instead, I use the standalone-toolchain to build, just link CodeSourcery's toolchain.

    1. Prepare the NDK toolchain first:

      Install the NDK toolchain as a standalone toolchain. See $NDK/docs/STANDALONE-TOOLCHAIN.html

      Add the bin path of cross-toolchain to your PATH

    2. Build boost.Build tool, in Boost prj:

      ./bootstrap.sh

    3. echo "using gcc : android : arm-linux-androideabi-g++ ;" > $HOME/user-config.jam

    4. Build example

      ./b2 --prefix=$HOME/mybuild --with-thread --with-system toolset=gcc-android threading=multi link=static install

    I hope these can help you.

提交回复
热议问题