From d36980242f27b1916725753ff37b519b82ba1627 Mon Sep 17 00:00:00 2001 From: Mia Bennett Date: Fri, 3 Dec 2021 00:56:19 +0000 Subject: [PATCH] Add reasons for compiling SQLite from source. --- compile_and_link_sqlite.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/compile_and_link_sqlite.md b/compile_and_link_sqlite.md index c1df671..106d64b 100644 --- a/compile_and_link_sqlite.md +++ b/compile_and_link_sqlite.md @@ -1,5 +1,12 @@ # How to Compile And Link SQLite +There are two main reasons to compile SQLite from source and they are both about getting features that are otherwise unavailable. + +- You may need a feature from a release that haven't made it to your distro yet or you want to use the latest code from development. +- Perhaps you want some compile time features enabled that are not commonly enabled by default. + +This guide assumes the first reason and goes through how to compile the latest release. + ## Install Prerequisites (Ubuntu) @@ -43,6 +50,9 @@ gcc -lpthread -ldl -shared -o libsqlite3.so.0 -fPIC sqlite3.c The path to libsqlite can be specified at runtime with "LD_LIBRARY_PATH". ```sh +# directory of your crystal app +cd ../app + # Crystal run LD_LIBRARY_PATH=../sqlite-amalgamation-3370000 crystal run src/app.cr