Reputation: 2462
I am trying to deploy single-file application using MySQL connection with Qt. And I discovered that app still depends on libmysql.dll
. That is because even though qt mysql driver plugin is static, it links to dynamic version of library. I tried configuring Qt with both -qt-sql-mysql
and -plugin-sql-mysql
,
Now here's the question: how can I build Qt so mysql library would be built in static qt mysql driver plugin? (or, directly into QtSql
)
Upvotes: 3
Views: 1134
Reputation: 359
Use/build a static version of libmysql (put the *.lib file in Qt's lib folder).
Configure with -qt-sql-mysql is enough.
Make sure that the lib is build with the same compiler/linker.
Upvotes: 1