Results 1 to 8 of 8

Thread: getting MySQL to work with Qt

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2006
    Location
    USA
    Posts
    23
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Question getting MySQL to work with Qt

    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 :
    ------
    Qt Code:
    1. #include <QCoreApplication>
    2. #include <QSqlDatabase>
    3. #include <QStringList>
    4. #include <QtDebug>
    5.  
    6. int main( int argc, char **argv )
    7. {
    8. QCoreApplication app( argc, argv );
    9. qDebug() << QSqlDatabase::drivers();
    10. }
    To copy to clipboard, switch view to plain text mode 

    ------

    Can anyone please help me fix the issues here?

    Thanks,
    Ashish
    Last edited by wysota; 14th May 2009 at 01:14.

Similar Threads

  1. Accessing xampp mysql database
    By synack in forum Newbie
    Replies: 8
    Last Post: 19th March 2009, 09:08
  2. Qt 4.4.0 + MinGW + MySQL installation problem
    By jambrek in forum Installation and Deployment
    Replies: 2
    Last Post: 1st December 2008, 11:02
  3. MySql and Qt 4.3 don't work together
    By john_crichton in forum Newbie
    Replies: 2
    Last Post: 9th May 2008, 11:57
  4. MySql plugin driver issues
    By stevey in forum Installation and Deployment
    Replies: 11
    Last Post: 20th September 2006, 13:45
  5. Qt 4.1.4 & Mysql 5 on Linux x64
    By bothapn in forum Installation and Deployment
    Replies: 7
    Last Post: 4th August 2006, 13:23

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.