I have problems with QMYSQL Driver!
-
did you try "these":http://www.lmgtfy.com/?q=qmsql+tutorial+
-
There is (or at least should be) a mysql.pro file in your Qt sources. If there isn't, you either are not looking hard enough, or you have an incomplete installation of the Qt sources. The former is more likely. Just making up a .pro file yourself is obviously not going to result in a valid project that is going to help you build the drivers.
-
@kallo here are the steps to build mysql plug-in driver ( and I assure you it works :-) ):
- download mysql-connector-c-noinstall-6.0.2-win32 binary package from mysql downloads.
- open %QTDIR%\src\plugins\sqldrivers\mysql\mysql.pro in QtCreator
- add LIBS and INCLUDEPATH in mysql.pro to match with your mysql-connector-c-noinstall-6.0.2-win32 path
- after mysql.pro is succesfully build, copy the qsqlmysqld4.dll + qsqlmysql4.dll in %QTDIR%\Desktop...etc...\plugins\sqldrivers (there should already be qsqlite4.dll)
- copy libmysql.dll in %QTDIR%\Desktop...etc...\bin
that's all
-
So I did how cincirin said
!http://img51.imageshack.us/img51/5876/unledcj.png!the output says
@
cannot find -libmysql
@Where should libmysql stay? or what I did wrong?
-
I have mysql-connector-c-noinstall-6.0.2-win32, extracted in the xampp/mysql folder
edit:
if I put
@
INCLUDEPATH += C:/xampp/mysql/include
LIBS += C:/xampp/mysql/lib/libmysql.a@
before
@
include(../../../sql/drivers/mysql/qsql_mysql.pri)
include(../qsqldriverbase.pri)
@
The output gives me 83 errors with undefined reference