Installing MySQL drivers for QT
Alright first:
I tried following the wiki link on this website to generate the sql driver and this part:
Go to %QTDIR%/src/plugins/sqldrivers/mysql
I don't have that folder so I have zero idea how to get there. Because I can't run
qmake -o Makefile "INCLUDEPATH+=C:/Progra~1/MySQL/MySQLS~1.0/include" "LIBS+=C:/Progra~1/MySQL/MySQLS~1.0/lib/opt/liblibmysql.a" mysql.pro
Since I don't have the mysql.pro, no idea if I have to write it.
Otherwise the QT doc's are also broken,
Open the DOS prompt, go to C:\Qt\4.6.2 and run the following commands:
configure.exe -debug-and-release -platform win32-g++ -qt-sql-mysql -l mysql -I C:\MySQL\MySQL51\include -L C:\MySQL\MySQL51\lib\opt
mingw32-make sub-src
I'm using QT 4.7, and there's no configure.exe tool whatsoever in the desktop SDK. I found one in the Symbian package and I get this(tried for the lulz) :
Include paths...............C:/Progra~1/MySQL/MySQL_Server_5.1/include
Additional libraries........-lmysql -LC:/Progra~1/MySQL/MySQL_Server_5.1\lib\opt
Creating qmake...
mingw32-make: *** No targets. Stop.
mingw32-make: *** No rule to make target `clean'. Stop.
Cleaning qmake failed, return code 2
So... anyone tried building the MySql driver for QT under windows 7 with QT 4.7? I'm kind of tired of following old guides and It would be my pleasure to update them if only I had mine in working order.
Re: Installing MySQL drivers for QT
if you don't have the mysql.pro file, then you havn't installed the Qt source files. Open the SDK updater and install Qt sources. It is then located at
c:/QtSDK/QtSources/4.7.4/src/plugins/sqldrivers/mysql.
Re: Installing MySQL drivers for QT
Alright thanks, another quick question.
I suppose that if the DLL work's with my code once I pack it in the release the end-user will just have to use the provided installer and thing's will work... right? Obviously I will also have to deal with the 64-bit version myself too, but that's not an issue.
Re: Installing MySQL drivers for QT
Jepp, that's the way it works.