PDA

View Full Version : Loading mysql driver



xtra
9th March 2012, 19:51
Hello,

I've managed to successfully run nmake and I got qsqlmysqld4.dll here at debug folder.
I copied it over to C:\QtSDK\QtCreator\bin\sqldrivers
I've made new project did QT += core gui sql at .pro file.
Ran test code to display available sql drivers:
("QSQLITE", "QODBC3", "QODBC")

Theres no mysql driver.

Anyone got an idea how to load the driver properly after it had been built?


I'm using Windows 7.

xtra
13th March 2012, 14:04
Can anyone help?

ChrisW67
13th March 2012, 21:45
The location you have placed it in is the private set of Qt libraries that Qt Creator uses. The correct location would be something like:
C:\QtSDK\Desktop\Qt\4.7.3\mingw\plugins\sqldrivers
where the Qt version should be adjusted in the obvious way, and the compiler name adapted if you are using MSVC.

Use "nmake install" or "mingw32-make install" generally does it, but with the split sources/binaries in the Qt SDK I am not sure that is still correct.