when trying to connect to a mysql database it gives the "QMYSQL driver not loaded" error
,I have installed qt using installer(and not the source) and it doesn't seem to have the qsqlmysql.dll file,i don't have it in sql drivers folder,i tried compiling the driver myself using the way mentioned in qt docs as follows:
cd %QTDIR%\src\plugins\sqldrivers\mysql
qmake "INCLUDEPATH+=C:\MySQL\include" "LIBS+=C:\MYSQL\lib\opt\libmysql.lib" mysql.pro
make
cd %QTDIR%\src\plugins\sqldrivers\mysql
qmake "INCLUDEPATH+=C:\MySQL\include" "LIBS+=C:\MYSQL\lib\opt\libmysql.lib" mysql.pro
make
To copy to clipboard, switch view to plain text mode
but when I submit the make command i get alot of " undefined reference to ..."
someone in a forum had the same problem as me and he made it work doing the following:
1. cd c:\qt\src\plugins\sqldrivers\mysql (c:\qt is where qt is installed)
2. qmake -o Makefile "INCLUDEPATH+=C:\MYSQL\INCLUDE"
"LIBS+=-LC:\MYSQL\LIB\OPT -lmysql" mysql.pro
make
1. cd c:\qt\src\plugins\sqldrivers\mysql (c:\qt is where qt is installed)
2. qmake -o Makefile "INCLUDEPATH+=C:\MYSQL\INCLUDE"
"LIBS+=-LC:\MYSQL\LIB\OPT -lmysql" mysql.pro
make
To copy to clipboard, switch view to plain text mode
but for me,again make phase gives erros,I have been searching for hours and trying couple of solutions but no luck so far,could someone tell me what to do? how to make that qsqlmysql.dll file?
thanks in advance
ps:
my mysql version is:
5.0.41-community-nt
my gcc version is:
3.4.2 (mingw-special)
my QT version is:
4.4.3
Bookmarks