Hello,
Today i've tried to use my mysql db, instead of the sqlite db i used so far.
When i tried to connect to the new db, i came across the QSqlDatabase: QMYSQL driver not loaded error.
To create the missing mysql driver i used following instruction:
everything worked fine so far, next i insertetQuote:
1.
cd %QTDIR%\src\plugins\sqldrivers\mysql
qmake -o Makefile "INCLUDEPATH+=C:\MYSQL\INCLUDE" "LIBS+=C:\MYSQL\LIB\OPT\LIBMYSQL.LIB" mysql.pro
nmake
2.
Copy the libmysql.dll file from the MySQL installation's bin directory to a directory in %PATH% (e.g. %QTDIR%/bin). (--> copied to it to C:\Program Files\qt4\bin)
#include <QtPlugin>
Q_IMPORT_PLUGIN(qsqlmysql)
in my code and
QTPLUGIN += qsqlmysql
in my *.pro file, as described here: http://doc.trolltech.com/4.1/plugins-howto.html
while i try to compile the project i get the following errormessage: undefined reference to `qt_plugin_instance_qsqlmysql()
I know adding LIBS += ???.file could help but what files or directories do i have to add ??? Tired already lots of files without results.
Hope someone knows a solution... ;)
PS: using QT::4:2:2 and Visual Studio 2003