[Interest] Qt5 mingw64 & mysql plugin

Etienne Sandré-Chardonnal etienne.sandre at m4x.org
Thu Apr 2 17:26:50 CEST 2015


Dear all,

I am trying to make the QMYSQL plugin work with Qt 5.4.1, built under
mingw-w64 4.9.1

I first compiled successfully the plugin with the mysql 64-bit package.
However, my application :
 - crashes when connecting to the DB
 - works but issues a "plugin not loaded" message if the libmysql.dll
cannot be found

The app is just a QMainWindow stub which calls connect() in the constructor:
bool MainWindow::connect()

{

	QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");

	db.setHostName("localhost");

	db.setDatabaseName("agc-ms");

	db.setUserName("agc-ms");

	db.setPassword("agc-ms");

	if (!db.open())

	{

		qDebug() << "Database error : " << db.lastError().text();

		return false;

	}

	return true;

}

I have read that mysql 64bits is not supported by the plugin; but if I
try to compile with the 32bit version , I get link errors (mysql lib
symbols not found)

Did someone manage to get QMYSQL working with 64bit mingw?

Thanks!

Etienne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150402/8e2e3252/attachment.html>


More information about the Interest mailing list