O'Reilly logo

Getting Started with LevelDB by Andy Dent

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Installing LevelDB and Building for iOS

The basics of getting LevelDB downloaded and unpacked are the same as in the beginning of Chapter 1, Downloading LevelDB and Building with OS X, but we will be rebuilding the library and need to vary the build steps a bit for iOS. Building for iOS is referred to as cross-compilation as the code being generated is for a different processor architecture from that running the compiler.

Building the static LevelDB library for iOS

To start with, we are going to rebuild the libleveldb.a file. This time, we are building without snappy and building for multiple architectures: the 32 bit x86 for the simulator and armv6 and armv7 for iOS devices. We'll finish by renaming it for iOS.

First up, remove snappy ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required