0

I'm new to QT. I tried to Installing QMYSQL driver by using MySQL Server8.0. But I'm unable to build the MySQL plugin for Qt. I tried many ways and thats thing does not help to me.

I used this way

C:\Qt\5.14.2\Src\qtbase\src\plugins\sqldrivers>qmake -- MYSQL_INCDIR="C:/Program Files/MySQL/Connector C++ 8.0/include"MYSQL_LIBDIR="C:/Program Files/MySQL/Connector C++ 8.0/ib64"

to build the MYSQL plugin to QT .

The results like this

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Geo Tech
  • 307
  • 3
  • 11

2 Answers2

0

You are on the right way to do that, I hope you are using this web-page https://doc.qt.io/qt-5/sql-driver.html#how-to-build-the-qmysql-plugin-on-windows

First of all, fix your command:

  1. add space before MYSQL_LIBDIR

  2. change "ib64" to "lib64"

  3. make sure all those paths are valid

    C:\Qt\5.14.2\Src\qtbase\src\plugins\sqldrivers>qmake -- MYSQL_INCDIR="C:/Program Files/MySQL/Connector C++ 8.0/include" MYSQL_LIBDIR="C:/Program Files/MySQL/Connector C++ 8.0/lib64"

Skident
  • 326
  • 1
  • 5
  • Yes. I've use that website. And try after fix command. However it's got same results. Can u explain how can i sure paths are valid? – Geo Tech May 25 '20 at 06:48
  • Just open your file navigator and go to this folder "C:/Program Files/MySQL/Connector C++ 8.0/", then check out files inside the "include" and "lib64" folders – Skident May 25 '20 at 07:28
  • Yes They have files. – Geo Tech May 25 '20 at 08:03
  • When I run the command " config.log " it show this error > compilation terminated. > mingw32-make: *** [Makefile:448: main.o] Error 1 => source failed verification. Trying source 1 (type sybaseEnv) of library tds ... => source failed condition '!config.win32'. test config.sqldrivers.libraries.tds FAILED – Geo Tech May 25 '20 at 08:29
  • take a look at this article, I hope you find an answer there https://forum.qt.io/topic/96506/qtdriver-not-load/4 – Skident May 25 '20 at 09:14
  • It does not help. – Geo Tech May 25 '20 at 11:17
0

Error was my command. C:\Qt\5.14.2\Src\qtbase\src\plugins\sqldrivers>qmake -- MYSQL_INCDIR="C:/Program Files/MySQL/Connector C++ 8.0/include"MYSQL_LIBDIR="C:/Program Files/MySQL/Connector C++ 8.0/ib64" in here it should not be Connector C++/path/ should be the MySQL Server8.0/path/. It should be the path for mysql.h file and libmysql.lib/libmysql.dll.

Geo Tech
  • 307
  • 3
  • 11