Skip to content

Commit 9237666

Browse files
authored
Windows support (#121)
* Fix Makefile.win to compile Removed non existent c_src\queue.c. * Add guide for Windows users
1 parent d85c100 commit 9237666

2 files changed

Lines changed: 45 additions & 1 deletion

File tree

Makefile.win

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
NMAKE = nmake /$(MAKEFLAGS)
1010
CFLAGS = /O2 /EHsc /I"sqlite3"
1111

12-
SRC = sqlite3\sqlite3.c c_src\sqlite3_nif.c c_src\queue.c
12+
SRC = sqlite3\sqlite3.c c_src\sqlite3_nif.c
1313

1414
all: clean priv\sqlite3_nif.dll
1515

guides/windows.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Windows Users
2+
3+
> Exqlite uses an [Erlang NIF](https://erlang.org/doc/tutorial/nif.html) under the hood.
4+
> Means calling a native implementation in C.
5+
> For Windows users this means compiling Exqlite does not magically just work.
6+
7+
## Requirements
8+
9+
### Install Microsoft Visual C++ Build Tools
10+
11+
Download page:
12+
[visualstudio.microsoft.com/visual-cpp-build-tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/)
13+
14+
Alternative direct download link:
15+
[aka.ms/vs/16/release/vs_buildtools.exe](https://aka.ms/vs/16/release/vs_buildtools.exe)
16+
_for Visual Studio 2019 - version 16_
17+
18+
## Building
19+
20+
### Start command prompt with necessary environment
21+
22+
> Assuming you want to build for Windows x64.
23+
24+
Within Windows Start menu search for:
25+
x64 Native Tools Command Prompt
26+
27+
Starting this command prompt all necessary environment variables for compiling should be ready.
28+
29+
Means ready to run:
30+
```cmd
31+
mix deps.compile exqlite
32+
33+
# or
34+
mix compile
35+
mix test
36+
```
37+
38+
**Alternative way to start prompt**
39+
40+
Assuming you have _latest_ version of Build Tools (Visual Studio 2019) installed.
41+
42+
```
43+
cmd /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
44+
```

0 commit comments

Comments
 (0)