This introduction assumes that you have already downloaded SQLCipher to your computer.

Building from Source

Basic instructions for building from source are available in the README file. Building SQLCipher is almost the same as compiling a regular version of SQLite with two small exceptions:

  1. You must define SQLITE_HAS_CODEC and SQLITE_TEMP_STORE=2 in your application when including SQLCipher
  2. You need to link against a reasonably modern OpenSSL libcrypto.

Compiling with static linking: (replace /path/to with the path to libcrypto.a)

  ./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="/path/to/libcrypto.a"

Compiling with dynamic linking:

  ./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"

There’s lots of tips available on the mailing list, and we encourage you to sign up and ask questions.

For iOS and Mac OS X (XCode)

We have a detailed tutorial describing how SQLCipher can be built with XCode and used in iPhone applications. However, SQLCipher has also been used on Mac OS X, Windows, and Linux, and should be usable on any platform that supports SQLite and OpenSSL.


There is a detailed tutorial with instructions on how to incorporate SQLCipher into an Android application.

Windows Binaries

The best resource for compiling SQLCipher on windows can be found in the MINGW thread on the mailing list. This process can be both difficult and time consuming, so we make a variety of pre-built windows binary packages available for sale.