Official "Boost Library" Support for Android and iOS

Official Boost library Support for Android and iOS?

Got reply from boost community
Yes. These platforms are not officially supported because no one has
volunteered to run regression tests regularly for them.

It is not possible for a Boost developer to test on all platforms. So
developers depend on the test results of regression tests run by
volunteers. For example, see
http://beta.boost.org/development/tests/trunk/developer/summary.html

If no one volunteers to run the tests for a particular platform, that
platform is not officially supported.

So if you care about Android or iOS becoming officially supported,
start running regular (preferably daily) regression tests for Boost.
See http://beta.boost.org/development/running_regression_tests.html

Include Boost C++ library in android

My question contained almost complete steps for including BOOST library in Android. But still there are some important points you should remember while working with this.

  • Delete auto generated obj and libs folder Each time before you compile your native code.

  • If you are going to write your native code in C++, add LOCAL_CPP_EXTENSION := .cpp to your Android.mk(jni/Android.mk) file.

  • if you are going to code in C++, put your all cpp code inside extern "C" {}.

    extern C { /*cpp code*/ }

Is Boost C++ thread supported by both iOS and Android?

Yes, I'm currently maintaining boost::thread code that runs on iOS and Android.

That said, unless you're attempting to run the same codebase on the two platforms, I would recommend Grand Central Dispatch on iOS instead of boost::thread.

How to use the boost library (including shared_ptr) with the Android NDK and STLport

It turned out that this approach does not entirely work when compiling a debuggable library. The release library is compiled with -O2 which optimizes out some infelicities, but the debug library is done with -O0 which reveals some additional problems. Furthermore, I wasn't too happy about having to edit the boost files. So with some additional study, I've come up with the following solution.

First, don't edit any of the boost files. Instead add the following to the header within the std namespace:

struct bad_cast : public exception {bad_cast operator()(){}};

Next add the following to the source file:

namespace boost
{
void throw_exception(std::exception const&) {}
}

This now compiles and links into the application even with android:debuggable="true" in AndroidManifest.xml. It doesn't run in the emulator, but then it wasn't doing that before I included this library either.

Building Boost Library on Mac OS for Android

(1)
Which issues? Did you face issues while compilation?
Are you using NDK 8rc ? If yes, then please check include and library path details mentioned in user configuration DOESNOT match with the NDK PATH

Check the following include path and update it as per the NDK path

-I$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/4.4.3/include

-I$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi/include

Once you update this path, you will not get the errors.

(2)
In Following site https://github.com/mevansam/cmoss, he has compiled on mac os x.

(3)
Else you may refer this post Official "Boost library" Support for Android and iOS? for alternatives.

How to build Boost-Libraries for iPhone

Start a new project in Xcode using the iPhone Static Library project template.
Then import the source and headers, and compile it that way. The result should be an iPhone compatible static library



Related Topics



Leave a reply



Submit