Results 1 to 7 of 7

Thread: Mysql installation on Qt 4.4.1

  1. #1
    Join Date
    Jun 2007
    Location
    Netherlands
    Posts
    54
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    8
    Thanked 1 Time in 1 Post

    Default Mysql installation on Qt 4.4.1

    Hi all

    I am trying to install the Mysql plugin in the free version of Qt. I use the instructions on http://wiki.qtcentre.org/index.php?t...ws_using_MinGW

    But when i run make i get the following error:

    Qt Code:
    1. C:\Qt\4.4.1\src\plugins\sqldrivers\mysql>make
    2. mingw32-make -f Makefile.Debug all
    3. mingw32-make[1]: Entering directory `C:/Qt/4.4.1/src/plugins/sqldrivers/mysql'
    4. g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -
    5. DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB -
    6. DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -I"..\..\..\..\i
    7. nclude\QtCore" -I"..\..\..\..\include\QtSql" -I"..\..\..\..\include\QtSql" -I"..
    8. \..\..\..\include" -I"c:\MySQL\MYSQLS~1.0\inlcude" -I"c:\Qt\4.4.1\include\Active
    9. Qt" -I"tmp\moc\debug_shared" -I"." -I"..\..\..\..\mkspecs\win32-g++" -o tmp\obj\
    10. debug_shared\main.o main.cpp
    11. In file included from main.cpp:46:
    12. ../../../sql/drivers/mysql/qsql_mysql.h:54:19: mysql.h: No such file or director
    13. y
    14. In file included from main.cpp:46:
    15. ../../../sql/drivers/mysql/qsql_mysql.h:109: error: expected `)' before '*' toke
    16. n
    17. mingw32-make[1]: *** [tmp/obj/debug_shared/main.o] Error 1
    18. mingw32-make[1]: Leaving directory `C:/Qt/4.4.1/src/plugins/sqldrivers/mysql'
    19. mingw32-make: *** [debug-all] Error 2
    20.  
    21. C:\Qt\4.4.1\src\plugins\sqldrivers\mysql>
    To copy to clipboard, switch view to plain text mode 

    the command i use before make is:

    Qt Code:
    1. C:\Qt\4.4.1\src\plugins\sqldrivers\mysql>qmake -o Makefile "INCLUDEPATH+=C:\MySQL\MYSQLS~1.0\inlcude" "LIBS+=C:\MySQL\MYSQLS~1.0\lib\opt\liblibmysql.a" mysql.pro
    To copy to clipboard, switch view to plain text mode 

    I have Mysql installed in C:\MySQL\MySQL Server 5.0\
    I have Qt 4.4.1 installed in C:\Qt\4.4.1\
    As OS i use windows vista 64 bit.

    I hope you guys can help me.

  2. #2
    Join Date
    May 2006
    Posts
    788
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    49
    Thanked 48 Times in 46 Posts

    Default Re: Mysql installation on Qt 4.4.1

    Have you install x64 mysql server && copy
    lib to compiler path lib ?

    whitout ......
    Makefile "INCLUDEPATH+=C:\MySQL\MYSQLS~1.0\inlcude" "LIBS+=C:\MySQL\MYSQLS~1.0\lib\opt\liblibmysql .a"

    Qt Code:
    1. cd C:\MySQL\lib
    2. reimp -d libmysql.lib
    3. dlltool -k --input-def libmysql.def --dllname libmysql.dll --output-lib C:\MinGW\lib\libmysql.a
    To copy to clipboard, switch view to plain text mode 

    x64 mysql server

    http://dev.mysql.com/downloads/mysql/5.0.html#winx64

  3. #3
    Join Date
    Jun 2007
    Location
    Netherlands
    Posts
    54
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    8
    Thanked 1 Time in 1 Post

    Default Re: Mysql installation on Qt 4.4.1

    I have installed the correct version of MySql.

    I ran the instructions you wrote in the code box.
    After that i copied the contents of C:\MySQL\MySQL Server 5.0\include to C:\MinGW\include and from C:\MySQL\MySQL Server 5.0\lib\opt to C:\MinGW\lib

    But after that i am not sure what to do?

  4. #4
    Join Date
    Jun 2007
    Location
    Netherlands
    Posts
    54
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    8
    Thanked 1 Time in 1 Post

    Default Re: Mysql installation on Qt 4.4.1

    Anyone that can help me?

  5. #5
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanked 370 Times in 336 Posts

    Default Re: Mysql installation on Qt 4.4.1

    rebuild mysql plugin.

  6. #6
    Join Date
    Dec 2007
    Posts
    129
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    5
    Thanked 1 Time in 1 Post

    Default Re: Mysql installation on Qt 4.4.1

    just follow what is wriiten in the wiki..

    the reimp command is important
    then go to "qt dir plugin" (again it is written in wiki) compile make and make install

  7. #7
    Join Date
    Jun 2007
    Location
    Netherlands
    Posts
    54
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    8
    Thanked 1 Time in 1 Post

    Default Re: Mysql installation on Qt 4.4.1

    I am sorry i didn't say anything in here. I was really busy with graduating from school and starting my master so i didn't have time to look at the mysql plugin for about 2 months. Now i have some time left and looked at both you're replies, thanks for them.

    I tried to build the mysql plugin from the intructions on the wiki page but when i try to run the make command in the "C:\Qt\4.4.3\src\plugins\sqldrivers\mysql" folder i get the following error:


    C:\Qt\4.4.3\src\plugins\sqldrivers\mysql>make
    mingw32-make -f Makefile.Debug all
    mingw32-make[1]: Entering directory `C:/Qt/4.4.3/src/plugins/sqldrivers/mysql'
    g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
    oc -mthreads -Wl -shared -Wl,--out-implib,c:\Qt\4.4.3\plugins\sqldrivers\libqsql
    mysqld4.a -o ..\..\..\..\plugins\sqldrivers\qsqlmysqld4.dll tmp/obj/debug_shared
    /main.o tmp/obj/debug_shared/qsql_mysql.o tmp/obj/debug_shared/moc_qsql_mysql.o
    -L"c:\Qt\4.4.3\lib" -L"c:\Qt\4.4.3\lib" tmp\obj\debug_shared\qsqlmysqld_resource_res.o C:\MySQL\MySQLS~1.0\lib\opt\liblibmysql.a -lQtSqld4 -lQtCored4
    Creating library file: c:\Qt\4.4.3\plugins\sqldrivers\libqsqlmysqld4.a
    tmp/obj/debug_shared/qsql_mysql.o(.text+0x10d): In function `Z5codecP8st_mysql':
    C:/Qt/4.4.3/src/plugins/sqldrivers/mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:211: undefined reference to `mysql_character_set_name@4'
    tmp/obj/debug_shared/qsql_mysql.o(.text+0x18a): In function `Z10qMakeErrorRK7QStringN9QSqlError9ErrorTypeEPK19 QMYSQLDriverPrivate':
    C:/Qt/4.4.3/src/plugins/sqldrivers/mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:222: undefined reference to `mysql_error@4'
    tmp/obj/debug_shared/qsql_mysql.o(.text+0x19d):C:/Qt/4.4.3/src/plugins/sqldriver
    s/mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:223: undefined reference to `mysql_errno@4'
    tmp/obj/debug_shared/qsql_mysql.o(.text+0x73e): In function `Z14qMakeStmtErrorRK7QStringN9QSqlError9ErrorTypeE P13st_mysql_stmt':
    C:/Qt/4.4.3/src/plugins/sqldrivers/mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:294: undefined reference to `mysql_stmt_error@4'
    tmp/obj/debug_shared/qsql_mysql.o(.text+0x74f):C:/Qt/4.4.3/src/plugins/sqldriver
    s/mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:295: undefined reference to `mysql_stmt_errno@4'
    tmp/obj/debug_shared/qsql_mysql.o(.text+0xaa0): In function `ZN19QMYSQLResultPrivate12bindInValuesEv':
    C:/Qt/4.4.3/src/plugins/sqldrivers/mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:333: undefined reference to `mysql_stmt_result_metadata@4'
    tmp/obj/debug_shared/qsql_mysql.o(.text+0xac9):C:/Qt/4.4.3/src/plugins/sqldriver
    s/mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:337: undefined reference to `mysql_num_fields@4'
    tmp/obj/debug_shared/qsql_mysql.o(.text+0xb48):C:/Qt/4.4.3/src/plugins/sqldriver
    s/mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:344: undefined reference to `mysql_fetch_field@4'
    tmp/obj/debug_shared/qsql_mysql.o(.text+0x1225): In function `ZN12QMYSQLResult7cleanupEv':
    C:/Qt/4.4.3/src/plugins/sqldrivers/mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:401: undefined reference to `mysql_free_result@4'
    tmp/obj/debug_shared/qsql_mysql.o(.text+0x1238):C:/Qt/4.4.3/src/plugins/sqldrive
    rs/mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:406: undefined reference to `mysql_next_result@4'
    tmp/obj/debug_shared/qsql_mysql.o(.text+0x124f):C:/Qt/4.4.3/src/plugins/sqldrive
    rs/mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:407: undefined reference to `mysql_store_result@4'
    tmp/obj/debug_shared/qsql_mysql.o(.text+0x1266):C:/Qt/4.4.3/src/plugins/sqldrive
    rs/mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:409: undefined reference to `mysql_free_result@4'
    tmp/obj/debug_shared/qsql_mysql.o(.text+0x1288):C:/Qt/4.4.3/src/plugins/sqldrive
    rs/mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:415: undefined reference to `mysql_stmt_close@4'
    tmp/obj/debug_shared/qsql_mysql.o(.text+0x12c7):C:/Qt/4.4.3/src/plugins/sqldrive
    rs/mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:421: undefined reference to `mysql_free_result@4'
    tmp/obj/debug_shared/qsql_mysql.o(.text+0x1544): In function `ZN12QMYSQLResult5fetchEi':
    C:/Qt/4.4.3/src/plugins/sqldrivers/mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:465: undefined reference to `mysql_stmt_data_seek@12'
    tmp/obj/debug_shared/qsql_mysql.o(.text+0x1558):C:/Qt/4.4.3/src/plugins/sqldrive
    rs/mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:467: undefined reference to `mysql_stmt_fetch@4'
    tmp/obj/debug_shared/qsql_mysql.o(.text+0x16e8):C:/Qt/4.4.3/src/plugins/sqldrive
    rs/mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:482: undefined reference to `mysql_data_seek@12'
    tmp/obj/debug_shared/qsql_mysql.o(.text+0x1708):C:/Qt/4.4.3/src/plugins/sqldrive
    rs/mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:483: undefined reference to `mysql_fetch_row@4'
    tmp/obj/debug_shared/qsql_mysql.o(.text+0x178a): In function `ZN12QMYSQLResult9fetchNextEv':
    C:/Qt/4.4.3/src/plugins/sqldrivers/mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:496: undefined reference to `mysql_stmt_fetch@4'
    tmp/obj/debug_shared/qsql_mysql.o(.text+0x17b1):C:/Qt/4.4.3/src/plugins/sqldrive
    rs/mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:502: undefined reference to `mysql_fetch_row@4'
    tmp/obj/debug_shared/qsql_mysql.o(.text+0x186f): In function `ZN12QMYSQLResult9fetchLastEv':
    C:/Qt/4.4.3/src/plugins/sqldrivers/mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:521: undefined reference to `mysql_stmt_num_rows@4'
    tmp/obj/debug_shared/qsql_mysql.o(.text+0x188b):C:/Qt/4.4.3/src/plugins/sqldrive
    rs/mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:526: undefined reference to `mysql_num_rows@4'
    tmp/obj/debug_shared/qsql_mysql.o(.text+0x1bc5): In function `ZN12QMYSQLResult4dataEi':

    collect2: ld returned 1 exit status
    mingw32-make[1]: *** [..\..\..\..\plugins\sqldrivers\qsqlmysqld4.dll] Error 1
    mingw32-make[1]: Leaving directory `C:/Qt/4.4.3/src/plugins/sqldrivers/mysql'
    mingw32-make: *** [debug-all] Error 2

    C:\Qt\4.4.3\src\plugins\sqldrivers\mysql>

    The original message is much longer but i had to shorten it. Wouldn't allow me to post it.

    I hope you guys are willing to help me again

    Regards
    Marcel

Similar Threads

  1. MySQL starting problem
    By shamik in forum General Discussion
    Replies: 5
    Last Post: 25th April 2007, 07:20
  2. Connection to MySQL - windows
    By Peter34 in forum Qt Programming
    Replies: 18
    Last Post: 30th October 2006, 18:54
  3. Qt and MySQL Database Connection
    By shamik in forum Qt Programming
    Replies: 41
    Last Post: 6th October 2006, 12:48
  4. Qt 4.1.4 & Mysql 5 on Linux x64
    By bothapn in forum Installation and Deployment
    Replies: 7
    Last Post: 4th August 2006, 13:23
  5. Qt 4.1 OS on Windows & mysql
    By neeko in forum Installation and Deployment
    Replies: 10
    Last Post: 31st January 2006, 20:22

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.