Afternoon all --
I've managed to perform a minor miracle and have compiled SQLCipher in Windows and on my Mac (following these instructions: https://sites.google.com/site/lukesh...er-for-windows and http://www.qtcentre.org/wiki/index.php?title=Building_QSQLITE_driver_with_AES-256_encryption_support_(Linux). On the Mac, w/out doing anything beyond the directions, when I execute the following code,
#include <QtGui>
#include <QtSql>
int main(int argc, char *argv[])
{
return 0;
}
#include <QtGui>
#include <QtSql>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
qDebug() << QSqlDatabase::drivers();
return 0;
}
To copy to clipboard, switch view to plain text mode
"QSQLCIPHER" does indeed show up. In Windows, I have modified my .pro to point to the new libraries accordingly, like so:
win32 {
message("Compiling for Windows!")
LIBS += \
c:\sqlcipher\.libs\libeay32.lib \
c:\sqlcipher\.libs\libsqlite3.a \
c:\sqlcipher\.libs\libgcc.a
INCLUDEPATH += c:\sqlcipher\
}
win32 {
message("Compiling for Windows!")
LIBS += \
c:\sqlcipher\.libs\libeay32.lib \
c:\sqlcipher\.libs\libsqlite3.a \
c:\sqlcipher\.libs\libgcc.a
INCLUDEPATH += c:\sqlcipher\
}
To copy to clipboard, switch view to plain text mode
but I *don't* see QSQLCIPHER using the same main.cpp
So, now I'm stuck as to what to "include" to use SQLCipher on both platforms, and there's not much documentation out there about that. I tried to open my DB (that's non-encrypted right now) using SQLCipher on the Mac, and the database didn't open (and the error told me nothing). Obviously I'm missing something easy, possible the correct "include", so please feel free to embarrass me in getting beyond this. I'm stuck on the Windows side trying to make the code "see" SQLCipher and then on both platforms actually using it.
Kodi
ps -- still googling in the meantime and will update if I figure it out
Ed. additional question -- is the sqlite3.h file created in the sqlcipher directory something I know need to be including? Should move it to build directory and/or add that directly into my project? Also, I found this link: https://code.google.com/p/qsqlcipher4win/downloads/list with a pre-compiled .dll (or course, after I spend hours creating a static one). Will I know how to add a library to my project I still can't get Windows working, and I think it's got something to do with the header file and making sure I have the right library linked in.
Bookmarks