8000 Add instruction how to compile dll on Windows by lstolcman · Pull Request #397 · sqlcipher/sqlcipher · GitHub
[go: up one dir, main page]

Skip to content

Add instruction how to compile dll on Windows #397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: prerelease
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add instruction how to compile dll on Windows
  • Loading branch information
Łukasz Stolcman committed Aug 11, 2021
commit 79eaac0ae0879d13acc0da566c6777209bb16add
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ xcuserdata/*
/sqlite3ext.h
/libsqlcipher.la
/.DS_Store
/build
16 changes: 16 additions & 0 deletions README.md
< B6EB /form>
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ Building SQLCipher is similar to compiling a regular version of SQLite from sour

The following examples demonstrate linking against OpenSSL, which is a readily available provider on most Unix-like systems.

### POSIX

Example 1. Static linking (replace /opt/local/lib with the path to libcrypto.a). Note in this
example, `--enable-tempstore=yes` is setting `SQLITE_TEMP_STORE=2` for the build.

Expand All @@ -56,6 +58,20 @@ Example 2. Dynamic linking
$ make
```

### Windows

Example 1. Compiling dll using Microsoft Visual Studio.
You need to enter the command inside Native Tools Command Prompt.
A path to OpenSSL is an example - it is recommended to install OpenSSL into
a custom directory without spaces (official installer uses "Program Files"
which contains a problematic space)

```
mkdir build
cd build
nmake /f ..\Makefile.msc dll CCOPTS="-DSQLITE_HAS_CODEC=1 -IC:\dev\OpenSSL-Win64\include" LDFLAGS="C:\dev\OpenSSL-Win64\lib\libcrypto.lib" TOP=..
```

## Testing

The full SQLite test suite will not complete successfully when using SQLCipher. In some cases encryption interferes with low-level tests that require access to database file data or features which are unsupported by SQLCipher. Those tests that are intended to support encryption are intended for non-SQLCipher implementations. In addition, because SQLite tests are not always isolated, if one test fails it can trigger a domino effect with other failures in later steps.
Expand Down
0