Results 1 to 7 of 7

Thread: Building MySQL QT Drivers on Windows XP

  1. #1
    Join Date
    Oct 2009
    Posts
    65
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Building MySQL QT Drivers on Windows XP

    Goodmorning to all,
    I'm a newbie of QT Framework and I would use it with MySQL.
    I read documentation about building of MySQL driver (I've 2010.04 Qt Version). It show how it is possibile build this driver by the mysql.pro project, by mean of qmake command or QtCreator. I've tried to run the Build command by QTCreator and, hiding the warning I got these result. nolink_mysql.jpg.

    So I've tried to link the mysql.h header of MySQL, and run Build; I got these errors.link_mysql.jpg

    I've tried to use qmake command from QT shell, or using the procedure with reimp command to create manually the libmysql.dll but no way.

    Have you got any ideas?

    I'm on Windows XP SP3. Peraphs miss some environment variables?

    Thanks for your time.

    Michele

  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: Building MySQL QT Drivers on Windows XP

    First I would do that on a console ("cmd" on windows) not in the creator. Since your path to the mysql header contains white space you have to use $$quote() in your qmake file. Are you using MinGW or MSVS?

  3. #3
    Join Date
    Oct 2009
    Posts
    65
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Building MySQL QT Drivers on Windows XP

    I'm using MinGW. The path is correct because from the first image and the last, the error relative to the mysql.h disappared. I've used other times this sintax and the library are correctly linked. But... how use $$Quote? $$quote("C:\....")? or only near the part $$quote("MySQL Server 5.1")?

    how can I catch all result of qmake command from cmd? I can see only the last part

    Thanks for your time.

    Michele

  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: Building MySQL QT Drivers on Windows XP

    Here is a great description on how to build the plugin. Try this: http://www.lemon-factory.com/2010/04...in-on-windows/

    And quote is to use with the whole path: $$quote("C:\....")

  5. #5
    Join Date
    Oct 2009
    Posts
    65
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Building MySQL QT Drivers on Windows XP

    (( No way (
    I've tried the procedure definited by the link you suggest (thanks for this link) but no way. The make command return 2 errors, but i can't see the complete verbose result of building How I can put these result in a file and analyze them after building process? Now I can see only one part of these ones.

    Thanks for your time.

    Michele

  6. #6
    Join Date
    Aug 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Building MySQL QT Drivers on Windows XP

    I've made it work a couple days ago:

    1º download mysql essentials fron mysql site.
    2º install everything on C:\MYSQL or some path like this, so you wont get headaches about spaces in paths
    3º build the plugin exactly as this guide says
    4º add in your .pro file in the QT section the string "sql" (without quotes)

    do exactly that and you should be ready to go!

    ah... btw, on the guide, ignore the "MinGW tips" section

  7. #7
    Join Date
    May 2009
    Location
    Canada
    Posts
    163
    Thanks
    7
    Thanked 20 Times in 20 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows Android

    Default Re: Building MySQL QT Drivers on Windows XP

    For the record, the guide from knifesk is also the one I used a month or so ago. However, to be fair, it is essentially the same as the one posted by Lykurg, at least to my newbish mind.

Similar Threads

  1. Installing QT in windows with mysql drivers
    By roncriss in forum Installation and Deployment
    Replies: 0
    Last Post: 20th November 2009, 03:45
  2. mysql drivers for QT-4.5.2
    By jsmith in forum Qt Programming
    Replies: 1
    Last Post: 31st August 2009, 11:33
  3. building an app with QSqlDatabase::drivers()
    By mgrzyma in forum Installation and Deployment
    Replies: 5
    Last Post: 20th February 2007, 20:19
  4. Need to compile with MySQL drivers/plugins
    By mongenix in forum Newbie
    Replies: 5
    Last Post: 6th January 2007, 20:24
  5. Problems building mysql plugin for Qt 4.1.2 on windows XP
    By Philip_Anselmo in forum Installation and Deployment
    Replies: 3
    Last Post: 17th May 2006, 15:38

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.