From 54048aae5be7b43612ce3df4fe7c5f4411ae5f97 Mon Sep 17 00:00:00 2001 From: Alexey Romanov Date: Thu, 9 Oct 2014 23:56:13 +0400 Subject: [PATCH] Define ERLANG_SQLITE3_LOAD_EXTENSION by default Fixes #30 --- README.md | 6 ++++-- c_src/sqlite3_drv.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ce2e921..dbdff12 100644 --- a/README.md +++ b/README.md @@ -36,9 +36,11 @@ If you want to use erlang-sqlite3 on an embedded device, it can be cross-compile 2. `nmake`. -## DLL search path +### Potential compilation problems -Note that on Windows, `sqlite3.dll` usually won't be installed in the system-wide DLL search path. In this case, it should be placed in the working directory of your application. +* On Windows, `sqlite3.dll` usually won't be installed in the system-wide DLL search path. In this case, it should be placed in the working directory of your application. + +* If SQLite was built with `SQLITE_OMIT_LOAD_EXTENSION` option, you'll need to undefine `ERLANG_SQLITE3_LOAD_EXTENSION` macro in . ## Running the test suite diff --git a/c_src/sqlite3_drv.h b/c_src/sqlite3_drv.h index 01ddeb4..d0c85d6 100644 --- a/c_src/sqlite3_drv.h +++ b/c_src/sqlite3_drv.h @@ -4,7 +4,7 @@ #endif #define _CRT_SECURE_NO_WARNINGS // secure functions aren't cross-platform -// #define ERLANG_SQLITE3_LOAD_EXTENSION // uncomment if you need to enable loading extensions +#define ERLANG_SQLITE3_LOAD_EXTENSION // comment out if SQLite is built with SQLITE_OMIT_LOAD_EXTENSION #include #include