I was surprised that official documentation does not include an example how to compile C projects that use SQLCipher.
I have managed to do $make and $make install of sqlcipher with dynamic linking of libcrypto under ArchLinux.
I want to build a simple SQL code in C, but I’m not sure how to compile it.
When only sqlite3 was available, I was doing it by: $gcc SQLite_example.c -l sqlite3
where SQLite_example.c had #include <\sqlite3.h> (ignore the backslash)
Now I have added as well (according to README): #define SQLITE_HAS_CODEC #define SQLITE_TEMP_STORE 2
How can I build my project so it uses sqlcipher and it’s function sqlite3_key?
Any help would be appreciated.
A small (noob) tutorial for those wanting to use SQLCipher programatically (calling sqlite3_key instead of PRAGMA) in their C projects (in the mean time I’ve managed to overcome the lack of doc).
#Building SQLCipher from source
(a small update to README.md is necessary, an update will be suggested on the official git page):
hey! would this still work in 2023? I really need to include sqlicipher to my little C project.
I was able to compile it on my windows machine and I can run sqlcipher from cmd, but I’m not sure how to include it in my C program. I already coded most of it, just need to add encryption to my database