These days quite a lot of projects use the really nice key-value database called LevelDB.
Sometimes you might need to compile LevelDB for whatever reason — of which I would not list here for the sake of my health. 😅
But we were surprised that LevelDB codebase only compiles a static lib, and not a shared one.
Then, totally by chance, we found out in this issue how to do it — saving us tons of time.
Just for documentation purposes, the steps are as follows.
First, change the CMakeLists.txt
file:
And then, execute the cmake
command with some more options:
In the end, you will see the output of a .so
or a .dylib
. 😃
💪 🎉