This is a simple example to demonstrate how you use LevelDB with C.
Install LevelDB either by yourself or with a package manager. I recommend Homebrew for OS X. Please note that LevelDB requires Snappy.
Compile with GCC:
gcc -Wall leveldb_example.c -lleveldb