Results 1 to 2 of 2

Thread: problems building the QMYSQL plugin on Windows 64 using MinGW 64

  1. #1
    Join Date
    Apr 2012
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default problems building the QMYSQL plugin on Windows 64 using MinGW 64

    Hello everybody,




    I tried to follow this guide: http://www.qtcentre.org/wiki/index.p...ws_using_MinGW

    and the first problem comes when the path folder seems different from the usual, coz mine is

    C:\QtSDK\QtCreator with bin, libe and share folders inside.

    and in that guide and googling usually I found

    %QTDIR%/src/plugins/sqldrivers/mysql.

    I found in this path on my computer the sqldrivers folder

    C:\QtSDK\QtCreator\bin\sqldrivers

    and I dont know how to build the Qmysql driver running this command

    cd %QTDIR%\src\plugins\sqldrivers\mysql
    qmake "INCLUDEPATH+=C:\MySQL\include" "LIBS+=C:\MYSQL\MySQL Server <version>\lib\opt\libmysql.lib" mysql.pro
    nmake

    I have located my libmysql.lib here

    C:\xampp\mysql\lib\libmysql.lib



    Some help please, thx in advance

  2. #2
    Join Date
    Mar 2010
    Location
    Heredia, Costa Rica
    Posts
    257
    Thanks
    24
    Thanked 17 Times in 14 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: problems building the QMYSQL plugin on Windows 64 using MinGW 64

    Hi,

    I am assuming that you have QT SDK for Windows 64 bits and mysql for 64 bits

    1. Put in your path environmental variable the qt bin and MinGW bin directories. This is accessible with properties of my computer --> advanced tab --> environmental variables (you need to be admin). For example: ;C:\Qt\2010.03\qt\bin;C:\Qt\2010.03\mingw\bin

    2. run cmd (the command line terminal)
    3. cd into the mysql plugin. For example: cd C:\Qt\2010.03\qt\src\plugins\sqldrivers\mysql
    4. run the following command substituting the path to where your mysql is (replace the C:\mysql\mysql-5.5.23-win32\ to where your mysql is) :

    Qt Code:
    1. qmake mysql.pro INCLUDEPATH+=C:\mysql\mysql-5.5.23-win32\include LIBS+=C:\mysql\mysql-5.5.23-win32\lib\libmysql.lib
    To copy to clipboard, switch view to plain text mode 

    5. run mingw64-make

    After this you will have the new mysql plugin in [QT directory]\plugins\sqldrivers.

    Carlos.

Similar Threads

  1. Problem building the OCI Plugin on Windows
    By Harald Klingel in forum Installation and Deployment
    Replies: 0
    Last Post: 18th January 2011, 17:12
  2. Thoughts on building Qt and QtCreator on Windows using MinGW
    By andy.fillebrown in forum Installation and Deployment
    Replies: 3
    Last Post: 17th November 2010, 12:25
  3. Problem building QMYSQL
    By Eternal in forum Newbie
    Replies: 0
    Last Post: 9th October 2009, 13:50
  4. Failure when building QT on Windows with MinGW
    By sharon in forum Installation and Deployment
    Replies: 2
    Last Post: 23rd August 2007, 13:38
  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

Tags for this Thread

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.