Results 1 to 13 of 13

Thread: QMYSQL driver not loaded

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2008
    Location
    Karaj,Iran
    Posts
    43
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Exclamation QMYSQL driver not loaded

    when trying to connect to a mysql database it gives the "QMYSQL driver not loaded" error
    ,I have installed qt using installer(and not the source) and it doesn't seem to have the qsqlmysql.dll file,i don't have it in sql drivers folder,i tried compiling the driver myself using the way mentioned in qt docs as follows:
    Qt Code:
    1. cd %QTDIR%\src\plugins\sqldrivers\mysql
    2. qmake "INCLUDEPATH+=C:\MySQL\include" "LIBS+=C:\MYSQL\lib\opt\libmysql.lib" mysql.pro
    3. make
    To copy to clipboard, switch view to plain text mode 
    but when I submit the make command i get alot of " undefined reference to ..."
    someone in a forum had the same problem as me and he made it work doing the following:
    Qt Code:
    1. 1. cd c:\qt\src\plugins\sqldrivers\mysql (c:\qt is where qt is installed)
    2. 2. qmake -o Makefile "INCLUDEPATH+=C:\MYSQL\INCLUDE"
    3.  
    4. "LIBS+=-LC:\MYSQL\LIB\OPT -lmysql" mysql.pro
    5.  
    6. make
    To copy to clipboard, switch view to plain text mode 
    but for me,again make phase gives erros,I have been searching for hours and trying couple of solutions but no luck so far,could someone tell me what to do? how to make that qsqlmysql.dll file?

    thanks in advance

    ps:
    my mysql version is:
    5.0.41-community-nt
    my gcc version is:
    3.4.2 (mingw-special)
    my QT version is:
    4.4.3
    Last edited by sepehr; 10th December 2008 at 22:05.

Similar Threads

  1. QSqlDatabase: QMYSQL driver not loaded
    By onder in forum Newbie
    Replies: 12
    Last Post: 29th March 2017, 14:43
  2. Unhandled exception in qatomic
    By NewGuy in forum Qt Programming
    Replies: 14
    Last Post: 23rd July 2013, 09:49
  3. mysql 5 connection
    By GuL in forum Newbie
    Replies: 37
    Last Post: 18th August 2008, 15:11
  4. SQlite driver not loaded error
    By ibergmark in forum Installation and Deployment
    Replies: 2
    Last Post: 17th March 2008, 01:09
  5. exception at 0x65100c40 (QtGuid4.dll)
    By sabeesh in forum Qt Programming
    Replies: 11
    Last Post: 21st December 2007, 17:10

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.