First of all you need to find where you installed mysql. I assume this will be somewhere in your Program Files . There you will see two folders: include and lib . If not, you have not installed the mysql version of the developer. Do not worry, just run the mysql installation again, select the update for the current installation and remember to check the "developer-something" in the wizard.
Now suppose you did everything right, and you found the mysql include and lib directories. Remember them (we will need them a bit later). Now you go into your Qt directory and find the driver sources there: ./Src/qtbase/src/plugins/sqldrivers/mysql .
Now follow a few steps:
- Open cmd and change to the mysql driver source directory
- Enter
qmake "INCLUDEPATH+=C:/MySQL/include" "LIBS+=C:/MySQL/lib/libmysql.lib" mysql.pro , where 'C: / MySQL / include' is your path to mysql include and 'C: / MySQL / lib 'is your path to mysql lib. - Type
nmake (or make if you are using mingw) - Type
nmake install (or make install ) - Add your mysql lib path to your PATH system
- Reboot
After that, everything should work fine.
Amartel
source share