Results 1 to 6 of 6

Thread: Installing SQL dirvers

  1. #1
    Join Date
    Aug 2009
    Posts
    140
    Thanks
    22
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Installing SQL dirvers

    Hi,

    I'm trying to install the SQL drivers on Windows 7, as per the instructions in the SQL Database Drivers help page. I'm using MinGW (I presume, since that's what Qt uses to build my programs) but when I'm in the qt directory and try to run mingw32-make or mingw32-make.exe from the command line, I get 'not recognized'. Same thing for nmake, and in that case the most recent version I could find (1.5) won't even install. And there is no option to compile SQL drivers when installing from the wizard. Can anyone give me a hand here? Thank you--

    Matt

  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 SQL dirvers

    did you start the normal command line or the command line which comes with the SDK (it set up some paths that all needed programs are found.) Also have a look at our wiki where you find an article on how to install mysql with gcc.

  3. #3
    Join Date
    Aug 2009
    Posts
    140
    Thanks
    22
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Installing SQL dirvers

    Thanks Lykurg,

    I had been trying the normal command line and tried again with the Qt command line. It still didn't recognize nmake. I tried mingw32-make, which told me it couldn't find mysql.h; but when I supplied the path,

    > mingw32-make -I"C:\Program Files\MySQL\MySQL Server 5.1\include"

    it still couldn't see mysql.h. The path is right;

    > dir "C:\Program Files\MySQL\MySQL Server 5.1\include\mysql.h"

    lists the file.

    Also I tried the Wiki but I only found a document on SQLite, which is already installed; I would really like to get MySQL.

    Matt

  4. #4
    Join Date
    Aug 2009
    Posts
    140
    Thanks
    22
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Installing SQL dirvers

    Followup--I tried to build mysql from within Qt, by opening mysql.pro. I added
    Qt Code:
    1. INCLUDEPATH += "C:\Program Files\MySQL\MySQL Server 5.1\include"
    2. LIBS += "C:\Program Files\MySQL\MySQL Server 5.1\lib\opt\libmysql.lib"
    To copy to clipboard, switch view to plain text mode 

    I ran qmake, clean, and then build, and got a list of undefined reference errors:

    tmp/obj/debug_shared/qsql_mysql.o: In function `codec':

    C:\Qt\2010.05\qt\src\plugins\sqldrivers\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:223: undefined reference to `mysql_character_set_name@4'

    tmp/obj/debug_shared/qsql_mysql.o: In function `qMakeError':
    C:\Qt\2010.05\qt\src\plugins\sqldrivers\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:234: undefined reference to `mysql_error@4'

    C:\Qt\2010.05\qt\src\plugins\sqldrivers\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:237: undefined reference to `mysql_errno@4'

    tmp/obj/debug_shared/qsql_mysql.o: In function `qMakeStmtError':

    C:\Qt\2010.05\qt\src\plugins\sqldrivers\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:309: undefined reference to `mysql_stmt_error@4'

    C:\Qt\2010.05\qt\src\plugins\sqldrivers\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:312: undefined reference to `mysql_stmt_errno@4'

    tmp/obj/debug_shared/qsql_mysql.o:C:\Qt\2010.05\qt\src\plugins\sqldrive rs\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:358: undefined reference to `mysql_stmt_result_metadata@4'

    tmp/obj/debug_shared/qsql_mysql.o:C:\Qt\2010.05\qt\src\plugins\sqldrive rs\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:362: undefined reference to `mysql_num_fields@4'

    tmp/obj/debug_shared/qsql_mysql.o:C:\Qt\2010.05\qt\src\plugins\sqldrive rs\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:369: undefined reference to `mysql_fetch_field@4'

    tmp/obj/debug_shared/qsql_mysql.o:C:\Qt\2010.05\qt\src\plugins\sqldrive rs\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:432: undefined reference to `mysql_free_result@4'

    tmp/obj/debug_shared/qsql_mysql.o:C:\Qt\2010.05\qt\src\plugins\sqldrive rs\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:438: undefined reference to `mysql_store_result@4'

    tmp/obj/debug_shared/qsql_mysql.o:C:\Qt\2010.05\qt\src\plugins\sqldrive rs\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:440: undefined reference to `mysql_free_result@4'

    tmp/obj/debug_shared/qsql_mysql.o:C:\Qt\2010.05\qt\src\plugins\sqldrive rs\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:437: undefined reference to `mysql_next_result@4'

    tmp/obj/debug_shared/qsql_mysql.o:C:\Qt\2010.05\qt\src\plugins\sqldrive rs\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:446: undefined reference to `mysql_stmt_close@4'

    tmp/obj/debug_shared/qsql_mysql.o:C:\Qt\2010.05\qt\src\plugins\sqldrive rs\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:452: undefined reference to `mysql_free_result@4'

    tmp/obj/debug_shared/qsql_mysql.o:C:\Qt\2010.05\qt\src\plugins\sqldrive rs\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:496: undefined reference to `mysql_stmt_data_seek@12'

    tmp/obj/debug_shared/qsql_mysql.o:C:\Qt\2010.05\qt\src\plugins\sqldrive rs\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:498: undefined reference to `mysql_stmt_fetch@4'

    tmp/obj/debug_shared/qsql_mysql.o:C:\Qt\2010.05\qt\src\plugins\sqldrive rs\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:513: undefined reference to `mysql_data_seek@12'

    tmp/obj/debug_shared/qsql_mysql.o:C:\Qt\2010.05\qt\src\plugins\sqldrive rs\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:514: undefined reference to `mysql_fetch_row@4'

    tmp/obj/debug_shared/qsql_mysql.o:C:\Qt\2010.05\qt\src\plugins\sqldrive rs\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:529: undefined reference to `mysql_stmt_fetch@4'

    tmp/obj/debug_shared/qsql_mysql.o:C:\Qt\2010.05\qt\src\plugins\sqldrive rs\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:544: undefined reference to `mysql_fetch_row@4'

    tmp/obj/debug_shared/qsql_mysql.o:C:\Qt\2010.05\qt\src\plugins\sqldrive rs\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:565: undefined reference to `mysql_stmt_num_rows@4'

    tmp/obj/debug_shared/qsql_mysql.o:C:\Qt\2010.05\qt\src\plugins\sqldrive rs\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:570: undefined reference to `mysql_num_rows@4'

    tmp/obj/debug_shared/qsql_mysql.o:C:\Qt\2010.05\qt\src\plugins\sqldrive rs\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:614: undefined reference to `mysql_fetch_lengths@4'

    ... many more'
    Anybody know what this is about? Thanks--

    Matt

  5. #5
    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 SQL dirvers

    seems to be a problem with the spaces in the paths. Try quote() in the pro file.

  6. #6
    Join Date
    Aug 2009
    Posts
    140
    Thanks
    22
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Installing SQL dirvers

    Hi Lykurg,

    So I tried this

    Qt Code:
    1. INCLUDEPATH += $$quote(C:\Program Files\MySQL\MySQL Server 5.1\include)
    2. LIBS += $$quote(C:\Program Files\MySQL\MySQL Server 5.1\lib\opt\libmysql.lib)
    To copy to clipboard, switch view to plain text mode 

    And got exactly the same thing.

    Matt

Similar Threads

  1. installing qt using
    By impeteperry in forum Installation and Deployment
    Replies: 2
    Last Post: 30th December 2009, 15:41
  2. Installing Qwt 5.1.1
    By WXNSNW in forum Qwt
    Replies: 3
    Last Post: 18th September 2008, 14:06
  3. Installing Qt 4 on Mac os X
    By qtray in forum Installation and Deployment
    Replies: 1
    Last Post: 8th August 2008, 21:34
  4. Installing
    By bsws1079 in forum Newbie
    Replies: 3
    Last Post: 2nd April 2007, 23:19
  5. Installing without using gcc
    By Rayven in forum Installation and Deployment
    Replies: 6
    Last Post: 31st May 2006, 22:28

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.