The important thing is specifying the ARM architecture. The fact that the chip is running Android is not that important for native code.

On Mar 23, 2014, at 1:22 PM, Philipp Kraus <philipp.kraus@tu-clausthal.de> wrote:


Am 23.03.2014 um 18:31 schrieb Paul A. Bristow <pbristow@hetp.u-net.com>:

-----Original Message-----
From: Boost-users [mailto:boost-users-bounces@lists.boost.org] On Behalf Of
Philipp Kraus
Sent: 22 March 2014 18:52
To: boost-users@lists.boost.org
Subject: [Boost-users] Boost and Android NDK

Hello,

I would like to use Boost on Nexus tablets. I have used Boost at the moment on
desktop systems (OSX, Linux, Windows), so my question can I use Boost e.g.
random,
asio, ublas, . on a Nexus? I would like to build Boost myself, so imho I must
build
Boost with the NDK compilers and linker, is this correct?
Can I build Boost libs in "one shot"? So the NDK has got tools for arm-linux,
mipsel-
linux and so on. Does anybody can tell me any hopeful tips to use Boost with
Android

Before you start worrying about 'building Boost', are you certain you need/want
Boost libraries that *must be built*, rather than just #include headers?


Does exist a official build option for Android NDK?
I have found http://stackoverflow.com/questions/17667978/using-boost-in-android-ndk-with-windows

and I use the current NDK r9d for OSX.  The Android NDK defined these toolchains:

arm-linux-androideabi-4.6
arm-linux-androideabi-4.8
arm-linux-androideabi-clang3.3
arm-linux-androideabi-clang3.4
llvm-3.3
llvm-3.4
mipsel-linux-android-4.6
mipsel-linux-android-4.8
mipsel-linux-android-clang3.3
mipsel-linux-android-clang3.4
x86-4.6
x86-4.8
x86-clang3.3
x86-clang3.4

I use at the moment for the Nexus arm-linux-androideabi-4.8. 
I have defined this for running

export NO_BZIP2=1
export NO_ZLIB=1
export AndroidNDKRoot="/Applications/Android/NDK/"
export TOOLCHAIN="arm-linux-androideabi-4.8"
export TARGETOS="arm-linux-androideabi-gcc"
export CXXPATH=$AndroidNDKRoot/toolchains/${TOOLCHAIN}/prebuilt/darwin-x86_64/bin
./b2 link=static threading=multi variant=release install --layout=tagged --prefix=/Applications/Android/Boost/1.55.0/$TOOLCHAIN/

So I get the error:

error: toolset gcc initialization:
error: version 'android' requested but 'g++-android' not found and version '4.2.1' of default 'g++' does not match

How can I get a working build configuration? I don't create a cross-compiling Boost lib, so it is my first try.

Thanks a lot

Phil

_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users