Need Help Installing MySQL Driver on Windows XP 32-Bit for QT 5
-
I am trying to install the mysql driver for MySQL 5.5 and Qt 5 as per the instructions in the Qt Help - but I am unable to get it to work.
What I have done:
- Installed Visual Studio 10
- Installed MySQL 5.5 full install
- Install Qt5
- Wrote the following code in main.cpp:
@
#include <QCoreApplication>
#include <QtCore>
#include <QtSql>int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);qDebug() << QSqlDatabase::drivers(); return a.exec();
}
@
5) added sql to the project file for above main.cpp file:
@#-------------------------------------------------
Project created by QtCreator 2012-12-21T07:52:30
#-------------------------------------------------
QT += core sql
QT -= gui
TARGET = DBConsoleApp
CONFIG += console
CONFIG -= app_bundleTEMPLATE = app
SOURCES += main.cpp
@
- Opened windows shell from Qt Start Menu and cd'ed in the plugins directory - i.e.C:\Qt\Qt5.0.0\5.0.0\msvc2010\plugins\sqldrivers
- mkdir mysql
- cd mysql - so now in C:\Qt\Qt5.0.0\5.0.0\msvc2010\plugins\sqldrivers\mysql directory
- typed the following as per help instructions:
@
qmake "INCLUDEPATH+=C:/Program Files/MySQL/MySQL 5.5 Server/include" "LIBS+=C:/Program Files/MySQL/MySQL 5.5 Server/lib/libmysql.lib" mysql.pro
@
10) Received output from qmake:
@
Cannot find file: mysql.pro.
@This is as far as I can get.
Please assist.
Thanks,Albert
-