简体   繁体   中英

static build of Qt with built-in MySQL library

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 )

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM