How to get working Qt mysql driver???
-
Hi everyone.
I got this error when I run the project:QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QODBC3 QODBCI've done many things but no positive results. Anyone knows a trick?
Thanks for reading this.P.D. I'm using MacOS
-
The MySql driver does not come build with your Qt SDK installation for licencing reasons. You will have to build it yourself. There are plenty of topics here on Qt Devnet and elsewhere on the net available on how to do it. You will need to get the Qt sources to do it though, and the MySql SDK.
-
Hi, i successeded to make it work i had explain how in this post, and if it dosen't work just send me a private msg(sorry my english is very bad). http://qt-project.org/forums/viewthread/18828/
-
Ok, I've done this:
-> Download Qt sources
-> Follow this steps :
http://qt-project.org/doc/qt-4.8/sql-driver.html#qmysqlBut after:
$qmake "INCLUDEPATH+=/usr/local/mysql/include" "LIBS+=-L/usr/local/mysql/lib -lmysqlclient_r" mysql.pro // Edited to set the real path$make // Returns:
->make: *** No targets specified and no makefile found. Stop.$ls -l output:
-rwxrwxrwx 1 dunix staff 204 Apr 26 15:46 README
-rwxrwxrwx 1 dunix staff 2571 Apr 26 15:46 main.cpp
-rwxrwxrwx 1 dunix staff 122 Apr 26 15:46 mysql.pro
drwxrwxrwx 5 dunix staff 315 Jul 19 16:45 qsqlmysql_debug.xcodeprojWhat should I do now?
Thanks everyone.