Compile and use boost for Android NDK R10e

前端 未结 5 598
面向向阳花
面向向阳花 2020-12-25 14:21

How do I compile and use Boost for the Android NDK? I\'ve tried everything I\'ve found online, from Boost for Android to compiling it myself with the bjam file. However, I d

5条回答
  •  伪装坚强ぢ
    2020-12-25 15:12

    We managed to compile it for NDKr10d. It should be the same for NDKr10e. The project-config.bjam should point to the gcc compiler from the NDK. Ours looks like this :

    import option ; 
    using gcc : arm : D:\\android\\ndk\\toolchains\\arm-linux-androideabi-4.9\\prebuilt\\windows-x86_64\\bin\\arm-linux-androideabi-g++.exe ; 
    option.set keep-going : false ; 
    

    Then just compile with b2, telling paths to android includes :

    b2 --reconfigure 
        toolset=gcc-arm
        include=\sources\cxx-stl\gnu-libstdc++\4.9\include
        include=\sources\cxx-stl\gnu-libstdc++\4.9\libs\\include
        include=\platforms\\arch-arm\usr\include
        install --libdir=stage\lib\
    

    We're about to move to ndkr10e. Could you tell if boost still works with it ? :)

提交回复
热议问题