Using sqlite with a static build of Qt 5.9.4 in MSVC2017
Unsolved
Installation and Deployment
-
Hi,
I am currently in the process of migrating a legacy application to Qt 5.9.4 which uses SQlite.
I have compiled a static version of Qt 5.9.4 with the new "--sql-sqlite" option, which generated a qsqlite.lib plugin in sqldrivers.
If I link this library the application produces an error (QSQLITE driver not loaded). If I insert
Q_IMPORT_PLUGIN(qsqlite)
into my application I get a linker error:
LNK2001 Unresolved symbol "struct QStaticPlugin const __cdecl qt_static_plugin_qsqlite(void)" (?qt_static_plugin_qsqlite@@YA?BUQStaticPlugin@@XZ)".
Is there anything else I need to be doing? We are using the Qt Visual Studio Tools (so no qmake .pro file).
Is it not possible to integrate sqlite in to static core directly (as was previously possible wit "--qt-sqlite" iirc)?
-
Hi and welcome to devnet,
It's explained in the Plugins Howto in Qt's documentation.