From 99e7a2188adddfe86af1efd04582b8574d218899 Mon Sep 17 00:00:00 2001 From: Alexey Romanov Date: Sat, 11 Oct 2014 01:48:14 +0400 Subject: [PATCH] Added details about building on Windows --- README.md | 4 +++- build_port_win.bat | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d1922ec..192dd37 100644 --- a/README.md +++ b/README.md @@ -38,12 +38,14 @@ If you want to use erlang-sqlite3 on an embedded device, it can be cross-compile to create the import library `sqlite3.lib`. In `rebar.config`, set the correct paths in tuples `{"win32", "CFLAGS", "/Idirectory/containing/sqlite3.h/ /Ic_src /W4 /wd4100 /wd4204"}` and `{"win32", "LDFLAGS", "/path/to/sqlite3.lib"}`. -2. `nmake`. +2. Run `nmake` if MSVC tools (`cl`, `link`, etc.) are already on the path. Otherwise, they should be make available by calling `vcvars32.bat` (see `build_port_win.bat` for the standard path). ### Potential compilation problems * 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 Erlang is 64-bit, so must be `sqlite3.dll` and MSVC (use `vcvars64.bat` instead of `vcvars32.bat`). + * 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/build_port_win.bat b/build_port_win.bat index 4d7d70b..3f7db5d 100644 --- a/build_port_win.bat +++ b/build_port_win.bat @@ -1,4 +1,5 @@ @echo off call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat" +REM call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\vcvars64.bat" nmake /f Makefile compile \ No newline at end of file