Hello,
I'm trying to run this module on windows with the sqlcipher extension, and I`m receiving an error as if my "pragma key" command is not working to decrypt the db after it is open.
To build the module, I made the download of the openssl's and sqlcipher's source code, following i generated the .lib and the .dll files, beyond the sqlite.h and the sqlite.lib(which I renamed to sqlcipher.lib in the directory).
I`m trying to compile the 32 bits version on Windows 10 x86.
For all this process I installed the following programs:
...setting the right Paths.
I already have tried to run this same process a while ago, but I got compilations errors during the process, almost all of them were about missing files. So along the console error messages I was putting the files from log directly into the Visual Studio folder(all those files were from the sqlcipher folder).
After putting all the missing files, i was be able to build the module by the following command on the MinGW console:
npm install sqlite3 --build-from-source --sqlite_libname=sqlcipher --sqlite=/c/sqlcipher
Is there another form to get known if the module was really built with the sqlcipher extension?
OR is there any other method to build it with the extension in an "more correctly" way?
I am really thankful for the help.
_Note .: I already have an server Which is running this same module with the sqlcipher extension , where I can open the db , run the query pragma , then I run another query normally , but this server has the Ubuntu Server as os._
I`m closing this issue, cuz now I could build the module with the sqlcipher extension for both platforms(windows and electron).
The problem that was occuring were some reference files, according to this tutorial http://www.jerryrw.com/howtocompile.php, i was already copying the files into the VS Folder, but today I tried to follow with the VS test described in the tutorial and I discovered some issues, for example, the sqlite3.dll built in the sqlcipher compilation process had to change it name to sqlite.dll(without the 3), and some build errors occurred in the process with the sqlite.lib(which I needed to rename to sqlcipher.lib for using with the node-pre-gyp).
So the VS tutorial kept telling to me the directions of the files, so I changed the files in the sqlcipher and VS folder.
Now, I`m really happy to use the sqlcipher with the node, as I was already using in Mac OS.
For who is having trouble to build it for Windows, I deeply reccomend the tutorial, it gave me the coords to make this work with my custom build.
related: #587
Try this one, guys! https://github.com/fritx/cross-sqlcipher
npm i cross-sqlcipher
@developerIdeia can you post how did you manage to compile with sqlcipher library? I could successfully compile for linux, but for window 7/10 it is not trivial. Thank you in advance.
i was able to build sqlcipher in windows10 but when i try to build get node-sqlite3 with that sqlcipher it fails. it would be helpful if someone hints on getting node-sqlite3 with sqlcipher support in windows.
@NallasivanK https://github.com/fritx/win-sqlcipher/issues/2#issuecomment-337419632
Most helpful comment
I`m closing this issue, cuz now I could build the module with the sqlcipher extension for both platforms(windows and electron).
The problem that was occuring were some reference files, according to this tutorial http://www.jerryrw.com/howtocompile.php, i was already copying the files into the VS Folder, but today I tried to follow with the VS test described in the tutorial and I discovered some issues, for example, the sqlite3.dll built in the sqlcipher compilation process had to change it name to sqlite.dll(without the 3), and some build errors occurred in the process with the sqlite.lib(which I needed to rename to sqlcipher.lib for using with the node-pre-gyp).
So the VS tutorial kept telling to me the directions of the files, so I changed the files in the sqlcipher and VS folder.
Now, I`m really happy to use the sqlcipher with the node, as I was already using in Mac OS.
For who is having trouble to build it for Windows, I deeply reccomend the tutorial, it gave me the coords to make this work with my custom build.