• Create Account

We're offering banner ads on our site from just $5! # Building Boost Serialization on Android Old topic! Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic. No replies to this topic ### #1kakum Members - Reputation: 123 Like 0Likes Like Posted 27 February 2013 - 08:44 PM I'm using android-ndk-r8d to try and build Boost's serialization library for Android. Here are some questions I have: When getting the NDK initially from Google here: http://developer.android.com/tools/sdk/ndk/index.html , ought I have gotten the Windows version, or the linux version? I'm using Windows, but to build Boost I need to use Cygwin. I've been operating under the assumption that I need to use the Windows version. What Boost libraries do I need to build? I am only interested in Serialization, but are there dependent libraries I need to build, as well? If so, when I get to making my Android project, will I need to link those libraries? What could be causing bjam to not be able to locate cstddef when i go to build the libraries? When I try to compile using the following command: ./bjam.exe --with-date_time --with_exception --with-filesystem --with-iostreams --with-serialization --with-system toolset=gcc-androidR8 -q cxxflags="$CXXFLAGS" link=static threading=single --layout=versioned install 2>&1 | tee -a ./BUILDLOG_LOG.LOG

I get errors like this:

in file included from ./boost/config.hpp ... ./boost/config/select_stdlib_config.hpp fatal error: cstddef: No such file or directory

where $CXXFLAGS is defined to: "-I$AndroidNDKRoot/platform/android-9/arch-arm/usr/include -I\$AndroidNDKRoot/sources/cxx-stl/gnu-libstdc++/4.6/linclude -IAndroidNDKRoot/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/include -IAndroidNDKRoot/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/include/bits"

Now, as far as I can tell, those CXXFlags ought to tell g++ where to find cstddef and similar, but apparently I'm misunderstanding what actually exists in those places, or bjam isn't passing CXXFLAGS along.

Unfortunately, I can't follow the trail through boost's build scripts well enough to find the problem, and can't even seem to locate any relevant documentation about boost's build process. Direction  towards either, or answers to any of my other questions, would be much appreciated.