googie
4th March 2013, 13:28
Hi,
I'm trying to compile sqlite2 plugin for qt5. I already have qt5 installed from binary installator (by the way - why doesn't it have plugin for sqlite2? it's licensed the same as sqlite3, which is public domain).
As I already have qt5, I don't want to compile whole qt, just one plugin for my existing Qt library.
By following instructions from http://qt-project.org/doc/qt-5.0/qtsql/sql-driver.html I've downloaded qt sources, entered "qt-everywhere-opensource-src-5.0.1/qtbase/src/plugins/sqldrivers/sqlite2". I've also prepared sqlite2 library:
bash-4.2$ pwd
/tmp/sqlite2
bash-4.2$ ls -l
total 1568
-rw-r--r-- 1 googie users 1563732 mar 4 13:46 libsqlite.a
-rw-r--r-- 1 googie users 38781 mar 4 13:46 sqlite.h
Now, from the sqlite2 plugin directory I'm executing:
qmake "INCLUDEPATH+=/tmp/sqlite2" "LIBS+=-L/tmp/sqlite2 -lsqlite"and I'm getting warning:
WARNING: /opt/spakowane/qt-everywhere-opensource-src-5.0.1/qtbase/src/plugins/sqldrivers/qsqldriverbase.pri:4: Unable to find file for inclusion qt_plugin
Project MESSAGE: Warning: unknown QT: sql-private
After that I'm unable to build the plugin:
bash-4.2$ make
/usr/lib/qt/bin/moc -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_SHARED -I/usr/lib/qt/mkspecs/linux-g++ -I. -I/usr/lib/qt/include/QtCore -I/usr/lib/qt/include -I/tmp/sqlite2 -I. smain.cpp -o smain.moc
g++ -c -pipe -O2 -march=i486 -mtune=i686 -Wall -W -D_REENTRANT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_SHARED -I/usr/lib/qt/mkspecs/linux-g++ -I. -I/usr/lib/qt/include/QtCore -I/usr/lib/qt/include -I/tmp/sqlite2 -I. -o smain.o smain.cpp
smain.cpp:42:30: fatal error: qsqldriverplugin.h: No such file or directory
compilation terminated.
make: *** [smain.o] Error 1
What do I do wrong?
I'm trying to compile sqlite2 plugin for qt5. I already have qt5 installed from binary installator (by the way - why doesn't it have plugin for sqlite2? it's licensed the same as sqlite3, which is public domain).
As I already have qt5, I don't want to compile whole qt, just one plugin for my existing Qt library.
By following instructions from http://qt-project.org/doc/qt-5.0/qtsql/sql-driver.html I've downloaded qt sources, entered "qt-everywhere-opensource-src-5.0.1/qtbase/src/plugins/sqldrivers/sqlite2". I've also prepared sqlite2 library:
bash-4.2$ pwd
/tmp/sqlite2
bash-4.2$ ls -l
total 1568
-rw-r--r-- 1 googie users 1563732 mar 4 13:46 libsqlite.a
-rw-r--r-- 1 googie users 38781 mar 4 13:46 sqlite.h
Now, from the sqlite2 plugin directory I'm executing:
qmake "INCLUDEPATH+=/tmp/sqlite2" "LIBS+=-L/tmp/sqlite2 -lsqlite"and I'm getting warning:
WARNING: /opt/spakowane/qt-everywhere-opensource-src-5.0.1/qtbase/src/plugins/sqldrivers/qsqldriverbase.pri:4: Unable to find file for inclusion qt_plugin
Project MESSAGE: Warning: unknown QT: sql-private
After that I'm unable to build the plugin:
bash-4.2$ make
/usr/lib/qt/bin/moc -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_SHARED -I/usr/lib/qt/mkspecs/linux-g++ -I. -I/usr/lib/qt/include/QtCore -I/usr/lib/qt/include -I/tmp/sqlite2 -I. smain.cpp -o smain.moc
g++ -c -pipe -O2 -march=i486 -mtune=i686 -Wall -W -D_REENTRANT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_SHARED -I/usr/lib/qt/mkspecs/linux-g++ -I. -I/usr/lib/qt/include/QtCore -I/usr/lib/qt/include -I/tmp/sqlite2 -I. -o smain.o smain.cpp
smain.cpp:42:30: fatal error: qsqldriverplugin.h: No such file or directory
compilation terminated.
make: *** [smain.o] Error 1
What do I do wrong?