Hi every one,
I am trying to build the mysql connection/drivers and connect to it using Qt (latest libraries 2.2) and mysql 5.5.13 community edition.
I have built the qt libraries and qt creator on my computer (using the method recommended in the Qt documentation, qmake, make, ...)
I also compiled mysql on my computer using mysql online documentation.
I managed to create libqsqlmysql.dylib and libqsqlmysql_debug.dylib and installed them in
/usr/local/Trolltech/Qt-4.7.3/plugins/sqldrivers
where my qt is installed. when i run the following code
#include <QtCore/QCoreApplication>
#include <QtSql>
#include <QtDebug>
int main(int argc, char *argv[])
{
qDebug() << db->drivers();
return 1;
}
#include <QtCore/QCoreApplication>
#include <QtSql>
#include <QtDebug>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QSqlDatabase * db = new QSqlDatabase;
qDebug() << db->drivers();
qDebug() << QCoreApplication::libraryPaths();
return 1;
}
To copy to clipboard, switch view to plain text mode
i only get
("QSQLITE", "QODBC3", "QODBC")
why mysql's driver is not loading?
I am new to Qt and my platform is mac os x 10.6.7. I appreciate your help and in need of it.
Bookmarks