Qt 4.8.0 - MySQL driver not specified

After reading this tutorial http://www.pikopong.com/blog/2011/07/11/how-to-enable-mysql-support-in-qt-sdk-for-windows-part-2/ , I was able to successfully build mysql lib for Qt. But for some reason it is not listed in the list of available drivers, although I copied the files in the correct directory.

This is what my Qt-plugins \ sqldrivers directory looks like:

C: \ QtSDK \ Desktop \ Qt \ 4.8.0 \ MinGW \ Plugins \ sqldrivers

  • libqsqlite4.a
  • libqsqlited4.a
  • libqsqlmysql4.a
  • libqsqlmysqld4.a
  • libqsqlodbc4.a
  • libqsqlodbcd4.a
  • qsqlite4.dll
  • qsqlited4.dll
  • qsqlmysql4.dll
  • qsqlmysqld4.dll
  • qsqlodbc4.dll
  • qsqlodbcd4.dll

And this is what QSqlDatabase :: drivers () say:

("QSQLITE", "QODBC3", "QODBC")

Is there anything significant missing? Thank you for your help and in advance!

+4
source share
1 answer

I solved the problem by following the instructions in this guide: http://christopher.rasch-olsen.no/2009/04/14/qt-45-and-mysql-plugin-with-mingw-on-windows-xp/ This was published as a solution to the same problem (see Carlson's comment)

+1
source

Source: https://habr.com/ru/post/1387764/