-
Decide where you're going to put the compiled library, e.g.
~/lib
. We'll call this<target-dir>
below. -
Clone ralight/sqlite3-pcre
-
Ensure
pcre
is installed (brew install pcre
). -
In the
sqlite3-pcre
directory, compile with:cc \ -shared \ -o <target-dir>/sqlite3-pcre.so \ -I/usr/local/opt/pcre/include \ -fPIC \ -W \ -Werror \ pcre.c \ -L/usr/local/opt/pcre/lib \ -lpcre
-
Add the following to
~/.sqliterc
:.load '<target-dir>/lib/sqlite3-pcre.so'
Note that neither environment variables nor shell expansions such as ~/
can be used in .sqliterc
.