I want to upgrade SQLite to the latest version, but didn't found how to build Qt plugin from SQLite source code available at their website.
I want to upgrade SQLite to the latest version, but didn't found how to build Qt plugin from SQLite source code available at their website.
I don't think you need to rebuild the plugin. Just replace the older SQLite library with the new one when deploying your app.
Library from SQLite website don't work with Qt.
Problem solved!
Last edited by giantdragon; 17th May 2011 at 23:52. Reason: Solved
No, they didn't forget to change the include. And if you want to use a different sqlite version than the one that comes with Qt then you need to tell Qt to use the system sqlite library instead of using the sources of sqlite directly (or you can just replace the source files and rebuild the driver). Consult "configure -help" for more info.
Fortunately I have successfully compiled latest SQLite version. It seems works!!!
1. Download latest SQLite sources, unpack them, copy to "C:\QtSDK\QtSources\4.7.3\src\3rdparty\sqlite"
2. Open file "C:\QtSDK\QtSources\4.7.3\src\sql\drivers\sqlite\q sql_sqlite.h" Replace "#include <QtSql/private/qsqlcachedresult_p.h>" to "#include <C:/QtSDK/QtSources/4.7.3/src/sql/kernel/qsqlcachedresult_p.h>"
3. cd "C:\QtSDK\QtSources\4.7.3\src\plugins\sqldrivers\s qlite"
4. qmake "INCLUDEPATH+=C:\QtSDK\QtSources\4.7.3\src\plugins \sqldrivers\" "LIBS+=C:\QtSDK\QtSources\4.7.3\src\plugins\sqldri vers\"
5. mingw32-make release
Spent whole day solving this problem. I think Nokia must write tutorial how to do this and update include path.
Last edited by giantdragon; 18th May 2011 at 00:02.
There's a perfectly good option to build the Qt libraries using a system (external) Sqlite, rather than the bundled Sqlite. It is documented in the configure options referred to by the existing install docs (See Step 4), and also pointed out by Wysota above. Had you used that option this exercise would have been trivial.I think Nokia must write tutorial how to do this and update include path.
configure --help
...
-system-sqlite ..... Use sqlite from the operating system.
...
-I <string> ........ Add an explicit include path.
-L <string> ........ Add an explicit library path.
...
- Download, unpack, build, and install the SQlite library.
- Unpack the Qt source or clean the configuration of an existing copy
- Configure the Qt source with the "-system-sqlite" option. You will probably also need the -I and -L options.
- Build Qt
After this updating the version of Sqlite used is as simple as replacing the shared library.
Last edited by ChrisW67; 18th May 2011 at 01:00.
Bookmarks