How to build and setup for Android on Linux (2.3+)
Note: if you are on Windows, we now have a NuGet package! Go straight to Use on Android to get started.First, follow all the instructions on Setup and Build on Linux. While some steps could be skipped if you only want to build for Android, it is useful to diagnose problems with a desktop build first.
Second, while our dependencies require a Linux system to build, once they are built you can transfer the products to a Windows computer and use them with your existing Android project under Eclipse. More information on this is provided in the relevant step. Casablanca depends on Boost, libiconv, and OpenSSL when used on Android. The script below will compile all of these dependencies for you.
For this walkthrough, we assume you are working within the Build_Android directory of the casablanca project.
git clone https://git01.codeplex.com/casablanca cd casablanca/Build_android
Install the Android NDK
The following instructions are written and tested against the android NDK version r10. Future and past versions may or may not work. The android NDK is available at http://developer.android.com/tools/sdk/ndk/index.html. If version r10 is not available for download, hard links are provided below.- Hard link to version r10 for Linux: http://dl.google.com/android/ndk/android-ndk32-r10-linux-x86_64.tar.bz2
- Hard link to version r10 for Windows: http://dl.google.com/android/ndk/android-ndk32-r10-windows-x86_64.zip
For this tutorial, we assume it is installed at ~/android-ndk-r10/.
Building Casablanca
mkdir build cd build ../configure.sh --ndk ~/android-ndk-r10
This will build armv7 binaries under the build.armv7.debug/Binaries and build.armv7.release/Binaries folders.