PDA

View Full Version : Problem in comopiling SqlCipher for Qt 5.5.1



H Aßdøµ
18th March 2016, 12:43
Hello,
When I compile qsqlcipher plugin, I see a header missing in the compilation errors message:

D:\Qt\5.5.1\5.5\src\qtbase\src\plugins\sqldrivers\ sqlcipher>mingw32-make
mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory 'D:/Qt/5.5.1/5.5/src/qtbase/src/plugins/sqldrivers/sqlcipher'
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
__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
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
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_
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
\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
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_
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
\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
rs\sqlite\qsql_sqlite.cpp
..\..\..\sql\drivers\sqlite\qsql_sqlite.cpp:50:46: fatal error: QtSql/private/qsqlcachedresult_p.h: No such file or directory
#include <QtSql/private/qsqlcachedresult_p.h>
^
compilation terminated.
Makefile.Release:459: recipe for target 'release/qsql_sqlite.o' failed
mingw32-make[1]: *** [release/qsql_sqlite.o] Error 1
mingw32-make[1]: Leaving directory 'D:/Qt/5.5.1/5.5/src/qtbase/src/plugins/sqldrivers/sqlcipher'
makefile:34: recipe for target 'release' failed
mingw32-make: *** [release] Error 2

sqlcipher.pro:

TARGET = qsqlcipher
QT = sql
HEADERS = D:/Qt/5.5.1/5.5/src/qtbase/src/sql/drivers/sqlite/qsql_sqlite_p.h
SOURCES = smain.cpp \
D:/Qt/5.5.1/5.5/src/qtbase/src/sql/drivers/sqlite/qsql_sqlite.cpp

!system-sqlite:!contains( LIBS, .*sqlite3.* ) {
CONFIG(release, debug|release)EFINES *= NDEBUG
DEFINES += SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE SQLITE_HAS_CODEC
INCLUDEPATH += include
INCLUDEPATH +=c:/sqlcipher
LIBS += -Ic:/sqlcipher -Ic:/OpenSSL/include c:/sqlcipher/libsqlite3.dll c:/openssl/libeay32.dll

} else {
LIBS *= $$QT_LFLAGS_SQLITE
QMAKE_CXXFLAGS *= $$QT_CFLAGS_SQLITE
}

include(../qsqldriverbase.pri)
#include(D:/Qt/5.5.1/5.5/src/qtbase/src/sql/kernel/kernel.pri)
#INCLUDEPATH += ../../src/sql/kernel

smain.cpp:

#include <qsqldriverplugin.h>
#include <qstringlist.h>
#include "../../../qtbase/src/sql/drivers/sqlite/qsql_sqlite_p.h"

QT_BEGIN_NAMESPACE

class QSQLCipherDriverPlugin : public QSqlDriverPlugin
{
Q_OBJECT

Q_PLUGIN_METADATA(
IID "org.qt-project.Qt.QSqlDriverFactoryInterface" FILE "sqlcipher.json")

public:

QSQLCipherDriverPlugin();

QSqlDriver *create(const QString&);
QStringList keys() const;
};


QSQLCipherDriverPlugin::QSQLCipherDriverPlugin()
: QSqlDriverPlugin()
{
}


QSqlDriver *QSQLCipherDriverPlugin::create(const QString& name)
{

if (name == QLatin1String("QSQLCIPHER"))
{
QSQLiteDriver *driver = new QSQLiteDriver();
return driver;
}
return 0;
}


QStringList QSQLCipherDriverPlugin::keys() const
{
QStringList l;

l << QLatin1String("QSQLCIPHER");
return l;
}


QT_END_NAMESPACE
#include "smain.moc"