
gcc SilkSQLite.cpp sqlite3.c  -shared -fPIC -o SilkSqlite -ldl

To compile with the static lib, please add -static-libstdc++:
gcc SilkSQLite.cpp sqlite3.c  -shared -fPIC -o SilkSQLite -ldl -static-libgcc -static-libdl

use the following command to list the dependence of the dll:
ldd -r SilkSQLite


sudo apt-get install sqlite3 libsqlite3-dev
gcc dbtest.c -o dbtest –lsqlite3