Right Background
Logo
flying carpet
Left Filler
Title Banner
Blank Home Mandelmania Gallery Other Java Audio Bytes About Blank
Left Background

The C++ Boost Version 1.53 Libraries for Android and FireMonkey

NOTE: These were compiled with gcc on CentOS Linux, and should be compatible with a variety of compilers for use in building C++ applications that run on Android.

To use the libraries, include the folder you extract these files into in your compiler's include path. Then add the .a files in your project, or make sure they get included in the linking process.

The boost folder contains the Boost C++ header files, and the lib folder contains the Android .a files, one for each of the main four architectures: armeabi, armeabi-v7a, mips, and x86.

Using the Boost Libraries in Cross-Platform FireMonkey Apps with Embarcadero's RAD Studio and C++ Builder

Include the applicable Boost header files you want to use in your application as you normally would. For Windows executables, Embarcadero's built-in Boost header files and libraries are normally used. However, those aren't included for Android apps, so include the boost header file path into your "System Include path" by going to Tools > Options > Environment Options > C++ Options > Paths and Directories > System Include path and entering it there.

In C++ Builder and RAD Studio make sure to add the Boost .a files for each architecture from the lib folder to your project by right-clicking on the project in Project Manager, select Add..., and selecting all the .a files from the lib folders. You'll have to repeat this process for each of the four main architectures to get all the .a files added.

To make sure the Boost header files get processed correctly, we have to convince the Boost library that it isn't being accessed from a __CODEGEARC__ compiler. This code can be used for this purpose:

#if defined(__ANDROID__)
#undef __CODEGEARC__
#endif

I haven't tested compiling cross-platform source code using the boost libraries for compatibility with OS X and iOS, but I believe it's possible to get this to work with OS x and iOS deployments as well. Perhaps a compiler directive code block such as the one above would be necessary, but checking for OS X or iOS by checking for the macro definition __APPLE__.

Use the Boost libraries as you normally would by including the applicable Boost header files for the features you are using in your source code.

Download

The .zip file is 135MB, and once uncompressed, the header and library files take up about 703MB of disk space.

Download here: boost-1-53-for-android.zip

RAD Studio XE8 (should work in Seattle, too) C++ Builder Sample Project

This is a sample project that shows a simple usage of Boost serialization and how to access the Boost for C++ libraries. Download it, and run it from within RAD Studio's C++ Builder. It has the corresponding Boost C++ serialization .a library files already added to the project and within the project folder, so it's not necessary to add them to run this app on an Android device.

Download here: AndroidBoostTest.zip

Now Available as a Free GetIt Add-On Package within RAD Studio

These libraries are now also available as a free GetIt add-on package from within RAD Studio XE8 and 10 Seattle. To download them from there, select GetIt... from the Tools menu, then find Boost for Android 1.53 and click Install. The files are downloaded to the

%USERPROFILE%\Documents\ Embarcadero\Studio\16.0\ CatalogRepository\Boost_Android_1.53

directory if using RAD Studio XE8, or a similar path if using RAD Studio Seattle. Add that directory to your include path, and then link in the files from the libs directory for the Boost features you are using, making sure to add the four architecture files for each Boost corresponding library feature you are using to your project, by dragging the files into your project window.

Or, to make things simpler, add all of the files, using #include statements to include the desired features in your code. Make sure to put the #undef code block on the left in your code as well, before the #include statements.

Known Issues

The optional<T> library is currently not functional.

Feedback?  Send comments to E-mail Address