How do I build QSQLITE Plugin for Qt 5.15.9 using the encrypted version (SEE) instead of the Open Source?
-
Re: Fun and games (?!) building QSQLITE for Qt 5.15.0
Hello Qt Forum,
I am in a similar position to AMGAMG in the above topic.
I have purchased the license for and downloaded sqlite3.c and sqlite3.h amalgamated source files for Sqlite Encryption Extension (aka SEE) version 3.38.5.
I would like to rebuild the Qt Plugin to use the above source files instead of the open source version of the amalgamated files from which the distributed version of Qt Plugin is built.
I am trying to follow the instructions here for Windows, msvc2019_64: How to Build the QSQLITE Plugin
But I get the following error from qmake:
ERROR: Assigning unknown variable 'SQLITE3_PREFIX' on command line.Any ideas why I am getting this error please?
Thank you.
-
Hi, just a guess but googling the error seems to suggest replacing SQLITE3_PREFIX with SQLITE_PREFIX, for example:
... C:\Qt\5.15.9\msvc2019_64\bin\qmake.exe -- -system-sqlite SQLITE_PREFIX=C:\SQLite
-
I had better success with your suggestion hskoglund. Thank you.
The qmake step succeeds. But now the next step, nmake, fails :-(
tbh, I have lost too much time trying to make a Qt Plugin for SQLite SEE.
So, I am going to wrap the amalgamation C source code into a c++ wrapper and use it without resorting to QSqlDatabase::addDatabase().Qt documentation is good but a complete walkthrough example of one sql plugin would have been useful. Looks like I am not the first or only person having issues getting this to work.
Also, since SQLCipher is open source too, it's a pity Qt don't include a driver for SQLCipher instead of one for SQLite3. After all, SQLCipher afaik is a superset of SQLite3 in terms of functionality.
Thanks again.
-
One other way is to simply replace the bundled
sqlite.c
file (<QT_SRC>\qtbase\src\3rdparty\sqlite\sqlite3.c
) with your custom copy before building the SQLite plugin (don't specify-system-sqlite
in this case).