Results 1 to 4 of 4

Thread: Installing MySQL drivers for QT

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2010
    Posts
    7
    Qt products
    Qt4

    Default Installing MySQL drivers for QT

    Alright first:

    I tried following the wiki link on this website to generate the sql driver and this part:

    Go to %QTDIR%/src/plugins/sqldrivers/mysql

    I don't have that folder so I have zero idea how to get there. Because I can't run

    qmake -o Makefile "INCLUDEPATH+=C:/Progra~1/MySQL/MySQLS~1.0/include" "LIBS+=C:/Progra~1/MySQL/MySQLS~1.0/lib/opt/liblibmysql.a" mysql.pro

    Since I don't have the mysql.pro, no idea if I have to write it.

    Otherwise the QT doc's are also broken,

    Open the DOS prompt, go to C:\Qt\4.6.2 and run the following commands:
    configure.exe -debug-and-release -platform win32-g++ -qt-sql-mysql -l mysql -I C:\MySQL\MySQL51\include -L C:\MySQL\MySQL51\lib\opt
    mingw32-make sub-src


    I'm using QT 4.7, and there's no configure.exe tool whatsoever in the desktop SDK. I found one in the Symbian package and I get this(tried for the lulz) :

    Include paths...............C:/Progra~1/MySQL/MySQL_Server_5.1/include
    Additional libraries........-lmysql -LC:/Progra~1/MySQL/MySQL_Server_5.1\lib\opt

    Creating qmake...
    mingw32-make: *** No targets. Stop.
    mingw32-make: *** No rule to make target `clean'. Stop.
    Cleaning qmake failed, return code 2



    So... anyone tried building the MySql driver for QT under windows 7 with QT 4.7? I'm kind of tired of following old guides and It would be my pleasure to update them if only I had mine in working order.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Installing MySQL drivers for QT

    if you don't have the mysql.pro file, then you havn't installed the Qt source files. Open the SDK updater and install Qt sources. It is then located at
    c:/QtSDK/QtSources/4.7.4/src/plugins/sqldrivers/mysql.

  3. #3
    Join Date
    May 2010
    Posts
    7
    Qt products
    Qt4

    Default Re: Installing MySQL drivers for QT

    Alright thanks, another quick question.

    I suppose that if the DLL work's with my code once I pack it in the release the end-user will just have to use the provided installer and thing's will work... right? Obviously I will also have to deal with the 64-bit version myself too, but that's not an issue.

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Installing MySQL drivers for QT

    Jepp, that's the way it works.

Similar Threads

  1. Does anyone have drivers to MySQL for QT 4.7.4
    By TomASS in forum Qt Programming
    Replies: 0
    Last Post: 4th October 2011, 23:14
  2. Yet *another* MYSQL drivers not loaded issue
    By MattPhillips in forum Installation and Deployment
    Replies: 21
    Last Post: 24th June 2011, 07:44
  3. Mysql drivers
    By thahir1986 in forum Newbie
    Replies: 2
    Last Post: 26th October 2010, 07:07
  4. Installing QT in windows with mysql drivers
    By roncriss in forum Installation and Deployment
    Replies: 0
    Last Post: 20th November 2009, 03:45
  5. mysql drivers for QT-4.5.2
    By jsmith in forum Qt Programming
    Replies: 1
    Last Post: 31st August 2009, 11:33

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
  •  
Qt is a trademark of The Qt Company.