- Tener instalado Qt 5.12.0 con el código fuente.
- Tener instalado libmysqlclient20 y libmysqlclient-dev
Debes ingresar a la carpeta
RUTA_QT/Qt/5.12.0/Src/qtbase/src/plugins/sqldrivers$
y ejecutar RUTA_QT/Qt/5.12.0/gcc_64/bin/qmake dentro de ésta. Luego mostrará un resumen con todos los drivers disponibles, entre los cuales estará el de MySQL, deberá decir ....... yes
Configure summary:
Qt Sql Drivers:
DB2 (IBM) .............................. no
InterBase .............................. no
MySql .................................. yes
OCI (Oracle) ........................... no
ODBC ................................... no
PostgreSQL ............................. no
SQLite2 ................................ no
SQLite ................................. yes
Using system provided SQLite ......... no
TDS (Sybase) ........................... no
Qt is now configured for building. Just run 'make'.
Once everything is built, Qt is installed.
You should NOT run 'make install'.
Note that this build cannot be deployed to other machines or devices.
Prior to reconfiguration, make sure you remove any leftovers from
the previous build.
Luego ejecutamos make
NO EJECUTAR make install, en su lugar es mejor copiar la librería compilada libqmysql.so la cual deberá estar en la ubicación RUTA_QT/Qt/5.12.0/Src/qtbase/src/plugins/sqldrivers/plugins/sqldrivers$ en la siguiente ubicación RUTA_QT/Qt/5.12.0/gcc_64/plugins/sqldrivers/$ reemplazando la antigua.
Con esto tendremos listo el plugin.
No hay comentarios.:
Publicar un comentario