Porting a library that requires RTTI, exception, and STL support
The Android platform provides a C++ runtime library at /system/lib/libstdc++.so
. This default runtime library does not provide C++ exception and RTTI. The support for a standard C++ library is also limited. Fortunately,
Android NDK provides alternatives to the default C++ runtime library, which makes porting of a large number of existing libraries that require exception, RTTI, and STL support, possible. This recipe discusses how to port a C++ library that requires RTTI, exception, and STL support. You will widely use the boost
library as an example.
How to do it...
The following steps describe how to build and use the boost
library
for Android NDK:
- Install a customized Android toolchain ...
Get Android Native Development Kit Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.