[Qt-interest] configuring Qt with MySQL
Ashish Singh
asinghmlists at gmail.com
Wed May 13 20:18:59 CEST 2009
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 )
{
QCoreApplication app( argc, argv );
qDebug() << QSqlDatabase::drivers();
}
------
Can anyone please help me fix the issues here?
Thanks,
Ashish
<http://www.qtcentre.org/forum/editpost.php?do=editpost&p=102755>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090513/6acafe6f/attachment.html
More information about the Qt-interest-old
mailing list