Hello,
When I compile qsqlcipher plugin, I see a header missing in the compilation errors message:
Qt Code:
  1. D:\Qt\5.5.1\5.5\src\qtbase\src\plugins\sqldrivers\sqlcipher>mingw32-make
  2. mingw32-make -f Makefile.Release
  3. mingw32-make[1]: Entering directory 'D:/Qt/5.5.1/5.5/src/qtbase/src/plugins/sqldrivers/sqlcipher'
  4. D:\Qt\5.5.1\5.5\mingw492_32\bin\moc.exe -DUNICODE -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_COMPLETE -DSQLITE_HAS_CODEC -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -D
  5. __GNUC__ -DWIN32 -I. -IC:/Utils/icu32_54_1_mingw492/include -IC:\openssl\include -IC:/utils/postgresql/pgsql/include -Iinclude -Ic:\sqlcipher -I../../src/sql/kernel -ID:\Qt\5.5.1\5.5\mingw492_32\inclu
  6. de -ID:\Qt\5.5.1\5.5\mingw492_32\include\QtSql -ID:\Qt\5.5.1\5.5\mingw492_32\include\QtCore -Irelease -I..\..\..\..\mkspecs\win32-g++ smain.cpp -o release\smain.moc
  7. g++ -c -pipe -fno-keep-inline-dllexport -O2 -fno-exceptions -frtti -Wall -Wextra -DUNICODE -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_COMPLETE -DSQLITE_HAS_CODEC -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_
  8. SQL_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I. -IC:/Utils/icu32_54_1_mingw492/include -IC:\openssl\include -IC:/utils/postgresql/pgsql/include -Iinclude -Ic:\sqlcipher -I../../src/sql/kernel -ID:\Qt\5.5.1
  9. \5.5\mingw492_32\include -ID:\Qt\5.5.1\5.5\mingw492_32\include\QtSql -ID:\Qt\5.5.1\5.5\mingw492_32\include\QtCore -Irelease -I..\..\..\..\mkspecs\win32-g++ -o release\smain.o smain.cpp
  10. g++ -c -pipe -fno-keep-inline-dllexport -O2 -fno-exceptions -frtti -Wall -Wextra -DUNICODE -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_COMPLETE -DSQLITE_HAS_CODEC -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_
  11. SQL_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I. -IC:/Utils/icu32_54_1_mingw492/include -IC:\openssl\include -IC:/utils/postgresql/pgsql/include -Iinclude -Ic:\sqlcipher -I../../src/sql/kernel -ID:\Qt\5.5.1
  12. \5.5\mingw492_32\include -ID:\Qt\5.5.1\5.5\mingw492_32\include\QtSql -ID:\Qt\5.5.1\5.5\mingw492_32\include\QtCore -Irelease -I..\..\..\..\mkspecs\win32-g++ -o release\qsql_sqlite.o ..\..\..\sql\drive
  13. rs\sqlite\qsql_sqlite.cpp
  14. ..\..\..\sql\drivers\sqlite\qsql_sqlite.cpp:50:46: fatal error: QtSql/private/qsqlcachedresult_p.h: No such file or directory
  15. #include <QtSql/private/qsqlcachedresult_p.h>
  16. ^
  17. compilation terminated.
  18. Makefile.Release:459: recipe for target 'release/qsql_sqlite.o' failed
  19. mingw32-make[1]: *** [release/qsql_sqlite.o] Error 1
  20. mingw32-make[1]: Leaving directory 'D:/Qt/5.5.1/5.5/src/qtbase/src/plugins/sqldrivers/sqlcipher'
  21. makefile:34: recipe for target 'release' failed
  22. mingw32-make: *** [release] Error 2
To copy to clipboard, switch view to plain text mode 

sqlcipher.pro:
Qt Code:
  1. TARGET = qsqlcipher
  2. QT = sql
  3. HEADERS = D:/Qt/5.5.1/5.5/src/qtbase/src/sql/drivers/sqlite/qsql_sqlite_p.h
  4. SOURCES = smain.cpp \
  5. D:/Qt/5.5.1/5.5/src/qtbase/src/sql/drivers/sqlite/qsql_sqlite.cpp
  6.  
  7. !system-sqlite:!contains( LIBS, .*sqlite3.* ) {
  8. CONFIG(release, debug|release)EFINES *= NDEBUG
  9. DEFINES += SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE SQLITE_HAS_CODEC
  10. INCLUDEPATH += include
  11. INCLUDEPATH +=c:/sqlcipher
  12. LIBS += -Ic:/sqlcipher -Ic:/OpenSSL/include c:/sqlcipher/libsqlite3.dll c:/openssl/libeay32.dll
  13.  
  14. } else {
  15. LIBS *= $$QT_LFLAGS_SQLITE
  16. QMAKE_CXXFLAGS *= $$QT_CFLAGS_SQLITE
  17. }
  18.  
  19. include(../qsqldriverbase.pri)
  20. #include(D:/Qt/5.5.1/5.5/src/qtbase/src/sql/kernel/kernel.pri)
  21. #INCLUDEPATH += ../../src/sql/kernel
To copy to clipboard, switch view to plain text mode 

smain.cpp:
Qt Code:
  1. #include <qsqldriverplugin.h>
  2. #include <qstringlist.h>
  3. #include "../../../qtbase/src/sql/drivers/sqlite/qsql_sqlite_p.h"
  4.  
  5. QT_BEGIN_NAMESPACE
  6.  
  7. class QSQLCipherDriverPlugin : public QSqlDriverPlugin
  8. {
  9. Q_OBJECT
  10.  
  11. Q_PLUGIN_METADATA(
  12. IID "org.qt-project.Qt.QSqlDriverFactoryInterface" FILE "sqlcipher.json")
  13.  
  14. public:
  15.  
  16. QSQLCipherDriverPlugin();
  17.  
  18. QSqlDriver *create(const QString&);
  19. QStringList keys() const;
  20. };
  21.  
  22.  
  23. QSQLCipherDriverPlugin::QSQLCipherDriverPlugin()
  24. {
  25. }
  26.  
  27.  
  28. QSqlDriver *QSQLCipherDriverPlugin::create(const QString& name)
  29. {
  30.  
  31. if (name == QLatin1String("QSQLCIPHER"))
  32. {
  33. QSQLiteDriver *driver = new QSQLiteDriver();
  34. return driver;
  35. }
  36. return 0;
  37. }
  38.  
  39.  
  40. QStringList QSQLCipherDriverPlugin::keys() const
  41. {
  42.  
  43. l << QLatin1String("QSQLCIPHER");
  44. return l;
  45. }
  46.  
  47.  
  48. QT_END_NAMESPACE
  49. #include "smain.moc"
To copy to clipboard, switch view to plain text mode