【问题标题】:MySQL Connector/C and MySQL Connector/C++ does not work with QTMySQL Connector/C 和 MySQL Connector/C++ 不适用于 QT
【发布时间】:2021-08-11 11:06:03
【问题描述】:

我已经安装了 QT5,我想安装 QMYSQL。所以我遵循了这本手册。这似乎很简单,但仍然没有任何反应。

https://doc.qt.io/qt-5/sql-driver.html#how-to-build-the-qmysql-plugin-on-windows

首先我有 %QTDIR% 工作,我已经安装了 MySQL Server 8.0 64-bit 和 MySQL Connector/C++。我还下载了 MySQL Connector/C,然后运行以下命令。

MySql .................................. no

如你所见。他们都不知道安装了 MySQL。为什么?

我在这里尝试MySQL Connector C 6.1

C:\QT\5.12.11\Src\qtbase\src\plugins\sqldrivers>qmake -- MYSQL_INCDIR="C:/Program Files/MySQL/MySQL Connector C 6.1/include" MYSQL_LIBDIR="C:/Program Files/MySQL/MySQL Connector C 6.1/lib"

Running configuration tests...
Done running configuration tests.

Configure summary:

Qt Sql Drivers:
  DB2 (IBM) .............................. no
  InterBase .............................. no
  MySql .................................. no
  OCI (Oracle) ........................... no
  ODBC ................................... yes
  PostgreSQL ............................. no
  SQLite2 ................................ no
  SQLite ................................. yes
    Using system provided SQLite ......... no
  TDS (Sybase) ........................... no

Qt is now configured for building. Just run 'mingw32-make'.
Once everything is built, you must run 'mingw32-make install'.
Qt will be installed into 'C:\QT\5.12.11\mingw73_64'.

Prior to reconfiguration, make sure you remove any leftovers from
the previous build. 

我在这里尝试MySQL Server 8.0

C:\QT\5.12.11\Src\qtbase\src\plugins\sqldrivers>qmake -- MYSQL_INCDIR="C:\Program Files\MySQL\MySQL Server 8.0\include" MYSQL_LIBDIR="C:\Program Files\MySQL\MySQL Server 8.0\lib"

Running configuration tests...
Done running configuration tests.

Configure summary:

Qt Sql Drivers:
  DB2 (IBM) .............................. no
  InterBase .............................. no
  MySql .................................. no
  OCI (Oracle) ........................... no
  ODBC ................................... yes
  PostgreSQL ............................. no
  SQLite2 ................................ no
  SQLite ................................. yes
    Using system provided SQLite ......... no
  TDS (Sybase) ........................... no

Qt is now configured for building. Just run 'mingw32-make'.
Once everything is built, you must run 'mingw32-make install'.
Qt will be installed into 'C:\QT\5.12.11\mingw73_64'.

Prior to reconfiguration, make sure you remove any leftovers from
the previous build.


C:\QT\5.12.11\Src\qtbase\src\plugins\sqldrivers>

【问题讨论】:

    标签: qt mysql-connector


    【解决方案1】:

    【讨论】:

      猜你喜欢
      • 2020-08-27
      • 2016-03-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多