Hi,
I have been trying to get Qt to work with MySQL without any luck. When I run a 2 line test code, it comes back with a message saying- "This application has failed to start because LIBMYSQL.DLL was not found. Re-installing the application may fix this problem". Can anyone please guide me on fixing the issue and getting MySQL to work with Qt?
Here's what I have done so far-
1) I downloaded and installed MySQL 5.1.34 using the installer( mysql-5.1.34-win32.msi) from MySQL website.
2) I downloaded the latest opensource Qt sources(qt-win-opensource-src-4.5.1) from Qt website and configured it as follows:
a) added the path to locate qmake etc.
b). configure -debug-and-release -l libmysql -I D:\MySQL\MySQLServer5.1\include -L D:\MySQL\MySQLServer5.1\lib\opt -qt-sql-mysql -qt-sql-odbc
c) nmake
These steps went fine but when I run the test code, it doesn't work. The code that I was trying to run is :
------
#include <QCoreApplication>
#include <QSqlDatabase>
#include <QStringList>
#include <QtDebug>
int main( int argc, char **argv )
{
}
#include <QCoreApplication>
#include <QSqlDatabase>
#include <QStringList>
#include <QtDebug>
int main( int argc, char **argv )
{
QCoreApplication app( argc, argv );
qDebug() << QSqlDatabase::drivers();
}
To copy to clipboard, switch view to plain text mode
------
Can anyone please help me fix the issues here?
Thanks,
Ashish
Bookmarks