-
Notifications
You must be signed in to change notification settings - Fork 0
Win64 setup — Compiling SQLCipher
- ActiveState ActiveTcl 8.5 Community Edition
- Windows (64-bit, x64)
-
GitHub Desktop for Windows
- GitHub Desktop for Windows 7 or later
- Microsoft Visual Studio Community 2013 Edition Update 5
- Click the "Visual Studio 2013" option 1/2 way down the left side → "Community 2013" → ISO
- OpenSSL
- From the first link (Shining Light Productions) → Win64 OpenSSL (use latest version)
Install Visual Studio 2013 using the instructions here.
Only follow the instructions for that one page, not the rest of the guide it is part of.
Install ActiveTcl 8.5 using the instructions here.
Install OpenSSL using the instructions here.
Only follow the instructions for that one page, not the rest of the guide it is part of.
Launch GitHub Desktop, then click the + sign in the upper left corner:

Then click the "Clone" tab.
Assuming you have forked the "sqlcipher" repository already, it should be in the list. If it is not then go to https://github.com/sqlcipher/sqlcipher and Fork the repository first.
Select it, then click "Clone sqlcipher":

Choose the C:\git_repos directory for cloning into:


Open the SQLCipher source code folder:

Edit the file C:\git_repos\sqlcipher\Makefile.msc using a text editor:


-
SQLITE3DLL- Should be changed tosqlcipher.dll

-
SQLITE3LIB- Should be changed tosqlcipher.lib

-
SQLITE3EXE- Should be changed tosqlcipher.exe

-
SQLITE3EXEPDB- Should be changed to/pdb:sqlciphersh.pdb

-
-DSQLITE_TEMP_STORE- Change it from 1 to 2

-
-DSQLITE_HAS_CODEC- Add this value to theTCCandRCCvariables

-
-IC:\dev\OpenSSL-Win64\include- Add this value toTCCandRCCtoo

-
/LIBPATH:C:\dev\OpenSSL-Win64\lib /LIBPATH:C:\dev\OpenSSL-Win64\lib\VC- Add to theLTLIBPATHSvariable -
4758cca.lib aep.lib atalla.lib capi.lib chil.lib cswift.lib gmp.lib gost.lib libeay32.lib nuron.lib padlock.lib ssleay32.lib sureware.lib ubsec.lib- Add to theLTLIBSvariable - Note - These filenames are just the list of files from C:\dev\OpenSSL-Win64\lib. If you have different files in your directory, use your filenames instead.

- Do a case sensitive search-n-replace, changing
sqlite3.deftosqlcipher.def(you should find 6 instances)
[no screenshots done yet 😉]
Launch the "VS2013 x64 Native Tools Command Prompt".
It's accessed through the "Visual Studio Tools" item in the Win 8.1 menu structure.



Change to the C:\git_repos\sqlcipher directory:

Then run this command to compile SQLCipher:
nmake /f Makefile.msc


It should run for about a minute or so, and you'll see various other commands running in the command prompt window.
It should finish without error, looking something like this:

If so, the process is now complete, with SQLCipher successfully compiled. 😋
[This step still needs to be written up properly.]
With Qt Creator, add "CONFIG+=sqlcipher" to the qmake line, like this:

If using MSVC 2013 as the IDE instead of Qt Creator, add "-Dsqlcipher=1" to the cmake command for generating the solution file. Like this:
cmake -G "Visual Studio 12 2013 Win64" -Wno-dev -Dsqlcipher=1