Added details about building on Windows

This commit is contained in:
Alexey Romanov
2014-10-11 01:48:14 +04:00
parent e4e3bb40f2
commit 99e7a2188a
2 changed files with 4 additions and 1 deletions

View File

@@ -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"}`. 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 ### 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. * 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 <c_src/sqlite3_drv.h>. * If SQLite was built with `SQLITE_OMIT_LOAD_EXTENSION` option, you'll need to undefine `ERLANG_SQLITE3_LOAD_EXTENSION` macro in <c_src/sqlite3_drv.h>.
## Running the test suite ## Running the test suite

View File

@@ -1,4 +1,5 @@
@echo off @echo off
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat" 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 nmake /f Makefile compile