Link to home
Start Free TrialLog in
Avatar of arjoshi77
arjoshi77

asked on

mysql plugin for QT

Hello:

I have successfully built the mysql plugin for QT. The build process resulted in the following 4 files:

qsqlmysql4.dll
qsqlmysql4.lib
qsqlmysqld4.dll
qsqlmysqld4.lib.

I copied the above files to the plugins directory of QT, and the .dll's to C:\windows\system32
Then I wrote sample code to test (see snippet 1). The code compiles, links and runs fine but i get no output.  According to
"http://www.pikopong.com/blog/2010/04/11/how-to-enable-mysql-support-in-qt-sdk-for-windows/
 the following code should output (see code snippet 2).
What am I doing wrong?
#include <QApplication>
      #include <QtSql>
     

      int main(int argc, char *argv[])
  {
      QCoreApplication a(argc, argv);
      qDebug() << QSqlDatabase::drivers();
      return a.exec();
   }

Open in new window

/* expected output */ 
      ("QSQLITE", "QMYSQL3", "QMYSQL", "QODBC3", "QODBC")

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of irfan_omair
irfan_omair
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of arjoshi77
arjoshi77

ASKER

thanks. I implemented all of your advisories and i am able to get output.
Thank you very much once again.
great, can you put the summary what exact steps helped it so that others can also get benefited from it.
Thank for assigning the points