[SOLVED]Connecting to database in Static build
-
Hi,
Have a look at the "plugin":http://qt-project.org/doc/qt-4.8/plugins-howto.html#static-plugins documentation
-
[quote author="SGaist" date="1366196645"]Hi,
Have a look at the "plugin":http://qt-project.org/doc/qt-4.8/plugins-howto.html#static-plugins documentation[/quote]
I added the plugins as mentioned above during configuration process:
[code]./configure -static -developer-build -v -qt-sql-psql -qt-sql-sqlite -plugin-sql-psql -plugin-sql-sqlite -qt-zlib -qt-libpng -qt-libjpeg -qt-pcre -qt-xcb[/code]PS
I'm using Qt 5.0.2 -
Plugin works with "shared/dll" builds. However, if you built Qt from source in "static" mode, you may still connect to a database - database plugins will be added to QtSql.lib/QtSqld.lib (I think).
There is also another option, use "QSqlDatabase::registerSqlDriver":http://qt-project.org/doc/qt-4.8/qsqldatabase.html#registerSqlDriver if you have a custom Sql Driver. I wrote a "blog":http://qtsimplify.blogspot.com/ on that thing 2 days ago if you need a reference.
-
You can find a similar document for Qt5
Did you update the pro file and your code to make use of the plugins you need ?