Scripts for building cross-platform c/c++ open source software libraries for iOS and Android.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


The CMOSS scripts can be used to build the following C/C++ Open Source Software libraries for native development on iOS and Android.

* minizip :
* icu :
* c-ares :
* bzip2 :
* libidn :
* GnuPG 1.4.x, Libgcrypt, Libgpg-error :
* OpenSSL - http://
* libSSH2 -
* expat - - XML event parser
* tinyxml - - XML DOM based parser
* yajl - - JSON parser
* sqlcipher - - SQLite with encryption
* boost - - C++ utilities
* soci - - generic C++ database API
* pion : - C++ HTTP API

The android kernel already provides some of these shared libraries so check if they are available before including them in your NDK project. For example both openssl and icu are part of the Android distribution. 

To build armv6 binaries for iOS you need to use the 5.1 SDK or lower. The blog at provides instructions on how to add the 5.1 SDK alongside the 6.0 SDK if you are using XCode 4.5. The scripts will automatically pick up the older SDK for armv6 builds. If the 5.1 SDK is not available then armv6 binaries will not be built.

The scripts will download the source code from the internet and build them locally. So your build machine needs to be connected to the internet when building. Once the source code archives have been downloaded they will be saved in the [cmoss root path]/tmp folder and will not be downloaded again unless you delete them or change the version. The builds have been tested with the versions hard-coded in the script files. If you change these versions it is possible the build for that library may break. If you do find a new version that breaks a build please let me know so it can be fixed.

There is an issue with the icu builds with the SDK that ship with versions before XCode 4.5. This results in the Android builds having to be rerun when the icu host build fails, but it fails the entire icu build for iOS. If you are on an older version of XCode please comment out the icu build step.

To run iOS build:

cd [cmoss root path]/build-ios
./ [installed sdk version #] [proxy_host:proxy_port]

(scripts were tested with SDK 6.0)

To run Android build:

cd [cmoss root path]/build-droid
./ [path to Android NDK] [proxy_host:proxy_port]

(scripts were tested with Android NDK r8d)

These build scripts were tested on a Mac OS X 10 with the following Mac ports:

  cmake @2.8.4_0 (active)
  cppunit @1.12.1_0 (active)
  dos2unix @5.1.1_0 (active)
  expat @2.0.1_1 (active)
  gettext @ (active)
  gperf @3.0.4_0 (active)
  libiconv @1.13.1_0 (active)
  libidn @1.20_0 (active)
  ncurses @5.8_0
  ncurses @5.8_1 (active)
  ncursesw @5.8_0 (active)
  openssl @1.0.0d_0 (active)
  wget @1.12_3+ssl (active)
  libtool @2.4.2 (active)
  zlib @1.2.5_0 (active)

The Android scripts should work in a Linux environment but have not been tested.

The builds do not run the unit tests that come with the libraries on each platform. If you run into linker issues with the libraries you will need to tweak the builds. Please let me know of any issues when using the libraries and fixes that need to be addressed.