Hi there
I’m using Qt 5.0.0 on Windows 7 ×64 (personal compile – MinGW x64). I added MySQL support in configuration and also MySQL is installed on system. MySQL libraries, headers and are visible in application.
Program crashes on opening database. I open database like this:
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
db.setDatabaseName("My DB name");
db.setUserName("root");
db.setPassword("My password");
db.setHostName("localhost");
db.setPort(3306);
Notes:
qDebug() << QSqlDatabase::drivers();
prints:
("QMYSQL3", "QMYSQL", "QODBC3", "QODBC", "QSQLITE")
What is difference between QMYSQL3 and QMYSQL ? I tried both and program crashes when opening database.
AFAIK MySQL driver is compiled with MSVC. I’m using MinGW. Can this be related to binary incompatibility ?
↧