Hi to all,

I'm new to and using Qt5.3.1 in Windows 7 and database as mysql ( server and
workbentch). I'd searched lot of websites and in Qt Documentation, but got no idea

how to connect Qt with database. In some Qt documents I found :-

How to Build the ODBC Plugin on Windows

The ODBC header and include files should already be installed in the right

directories. You just have to build the plugin as follows:

cd %QTDIR%\src\plugins\sqldrivers\odbc
qmake odbc.pro

If you are not using a Microsoft compiler, replace nmake with make in the line

and not found any nmake.exe or make.exe in these PATHs:-


I found plugin directory only in following path :-

C:\Qt\Qt5.3.1\5.3\Src\qtbase\src\plugins\sqldriver s

When I compile ...\src\plugins\sqldrivers\odbc\odbc.pro
error was "can not find the executable, please specify one"
and in the path :-

C:\Qt\Qt5.3.1\5.3\Src\qtbase\src\plugins\sqldriver s\build-odbc-

there is not any executable or dll file.

but found these (in PATH "C:\plugins\sqldrivers") :-
- libqsqlodbc.a
- libqsqlodbcd.a
- qsqlodbc.dll
- qsqlodbcd.dll
but what to do with these. I tried as pasting these DLLs in "C:\windows\system32\"
and "C:\windows\sysWOW64\"

but again foud error :
"driver not loaded diver not loaded"
and when I compile
in file "C:\Qt\Qt5.3.1\5.3\Src\qtbase\src\sql\drivers\mysq l\qsql_mysql_p.h:63:

error: mysql.h: No such file or directory
#include <mysql.h>
Please tell me how to connect mysql and Qt5.3.1 using connector/odbc driver.