Create MySQL driver for Qt5 on Windows
Posted on 19 February 2013 - 14:24
This tutorial explains how to create the MySQL driver for Qt5 on Windows using MinGW. If you are looking for the tutorial to do this with Qt4, click here.
Step 1
Download all the needed software.
- Qt (libraries and source code)
This are two separate files! E.g. qt-windows-opensource-5.0.1-mingw47_32-x86-offline.exe and qt-everywhere-opensource-src-5.0.1.zip - MySQL Community Server (E.g. mysql-5.5.30-win32.msi)
I didn't use version 5.6 because the .msi only allowed me to install the 64-bit version of theClient C API Library
, which apparently gives errors later in the tutorial. So make sure you get the 32-bit verison! If you really want version 5.6, an option might be to download the 32-bit version of the source files and use those. Note that I didn't test this option, so I can't help you with that.
Step 2
Install the downloaded software.
- Install Qt, the components I installed are the default ones. (See image 1)
- Install MySQL, you only need to install the
Client C API Library
the other components are optional for this tutorial. (See image 2)