Page 1 of 2 12 LastLast
Results 1 to 20 of 26

Thread: Problem Wtih Connecting MySQL Database on Windows

  1. #1
    Join Date
    Feb 2009
    Posts
    39
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Problem Wtih Connecting MySQL Database on Windows

    Hi to all,


    I am developing an application using Qt and my database is MySQL on windows. I gone through SQL Database Driver in Qt Assistance provided by Trolltech. Here i found that i need to create plugin for MySQL.

    I followed the instructions provided in the Qt Assistance as follows:


    cd %QTDIR%\src\plugins\sqldrivers\mysql
    qmake -o Makefile "INCLUDEPATH+=C:\MySQL\include" "LIBS+=C:\MySQL\lib\opt\libmysql.lib" mysql.pro
    nmake

    I am getting the following error:

    C:\Qt\4.3.4\src\plugins\sqldrivers\mysql>nmake
    'nmake' is not recognized as an internal or external command,
    operable program or batch file.


    Can any one resolve my problem

    Waiting for your reply.

    Regards,

    Narasimha Raju. Naidu

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

    Default Re: Problem Wtih Connecting MySQL Database on Windows

    open VS command prompt and run these commands again.
    the command prompt is located Start->All programms->Microsoft Studio Visual Studio->Visual Studio Tools.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  3. #3
    Join Date
    Feb 2009
    Posts
    39
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem Wtih Connecting MySQL Database on Windows

    Thanks for your reply.

    I am using MingW and i tried to compile and i am getting the following error.

    Qt Code:
    1. C:\Qt\4.3.4\src\plugins\sqldrivers\mysql>qmake -o Makefile "INCLUDEPATH+=C:\prog
    2. ra~1\MySQL\include" "LIBS+=C:\progra~1\lib\opt\libmysql.lib" mysql.pro
    3.  
    4. C:\Qt\4.3.4\src\plugins\sqldrivers\mysql>mingw32-make
    5. mingw32-make -f Makefile.Release
    6. mingw32-make[1]: Entering directory `C:/Qt/4.3.4/src/plugins/sqldrivers/mysql'
    7. g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT
    8. -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_NO_DEBUG -DQT_PLUGIN
    9. -DQT_SQL_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -
    10. I"..\..\..\..\include\QtCore" -I"..\..\..\..\include\QtSql" -I"..\..\..\..\inclu
    11. de\QtSql" -I"..\..\..\..\include" -I"c:\progra~1\MySQL\include" -I"c:\Qt\4.3.4\i
    12. nclude\ActiveQt" -I"tmp\moc\release_shared" -I"." -I"..\..\..\..\mkspecs\win32-g
    13. ++" -o tmp\obj\release_shared\main.o main.cpp
    14. In file included from main.cpp:46:
    15. ../../../sql/drivers/mysql/qsql_mysql.h:54:19: mysql.h: No such file or director
    16. y
    17. In file included from main.cpp:46:
    18. ../../../sql/drivers/mysql/qsql_mysql.h:105: error: expected `)' before '*' toke
    19. n
    20. mingw32-make[1]: *** [tmp/obj/release_shared/main.o] Error 1
    21. mingw32-make[1]: Leaving directory `C:/Qt/4.3.4/src/plugins/sqldrivers/mysql'
    22. mingw32-make: *** [release] Error 2
    To copy to clipboard, switch view to plain text mode 


    can you help me out.

    Regards,

    Narasimha Raju. Naidu

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

    Default Re: Problem Wtih Connecting MySQL Database on Windows

    you have to create a static lib of MySQL which MinGW can recognize.
    read this how to do this. when you will create a static lib for MinGW then repeat your steps again.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  5. #5
    Join Date
    Feb 2009
    Posts
    39
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem Wtih Connecting MySQL Database on Windows

    Thanks for your reply

    I gone through the instructions and downloaded impdef, copied in to C:\MingW\bin. Then i executed the following command and i got the following error.

    Qt Code:
    1. C:\MinGW\bin>dlltool --dllname libmysql.dll --def libmysql.def --output-lib libm
    2. ysql.a
    3. dlltool: Can't open def file: libmysql.def
    4.  
    5. C:\MinGW\bin>
    To copy to clipboard, switch view to plain text mode 

    Waiting for your reply

    Regards,

    Narasimha Raju.Naidu

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

    Default Re: Problem Wtih Connecting MySQL Database on Windows

    use this tool.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  7. #7
    Join Date
    Feb 2009
    Posts
    39
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem Wtih Connecting MySQL Database on Windows

    Thanks for your reply.

    I downloaded the file and extracted at C:\MinGW\bin. and executed the command but still i am getting the same error.


    Regards,

    Narasimha Raju. Naidu

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

    Default Re: Problem Wtih Connecting MySQL Database on Windows

    did you rename a file in archive from impdef_tar to impdef.tar?
    did you create libmysql.def using impdef libmysql.dll > libmysql.def?
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  9. #9
    Join Date
    Feb 2009
    Posts
    39
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem Wtih Connecting MySQL Database on Windows

    Thanks for your reply,

    I successfully created libmysql.def file. what should i do now. Where should i keep this file. Right now this file is at C:\MinGW\bin.

    Waiting for your reply

    Regards,

    Narasimha Raju. Naidu

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

    Default Re: Problem Wtih Connecting MySQL Database on Windows

    1. navigate to MYSQLDIR\lib\opt
    cd MYSQLDIR\lib\opt
    2. impdef libmysql.dll > libmysql.def
    3. dlltool --dllname libmysql.dll --def libmysql.def --output-lib libmysql.a
    4. navigate to QTDIR\src\plugins\sqldrivers\mysql
    cd %QTDIR%\src\plugins\sqldrivers\mysql
    qmake "INCLUDEPATH+=MYSQLDIR\include" "LIBS+=MYSQLDIR\lib\opt\libmysql.a" mysql.pro
    mingw32-make
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  11. #11
    Join Date
    Feb 2009
    Posts
    39
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem Wtih Connecting MySQL Database on Windows

    Thanks for your reply,

    According to your instructions i navigated my current directory to mysqldir\lib\opt
    and tried to compile and i got the following error


    C:\PROGRA~1\MySQL\MySQL Server 5.0\lib\opt>dlltool --dllname libmysql.dll --def
    libmysql.def --output-lib libmysql.a
    'dlltool' is not recognized as an internal or external command,
    operable program or batch file.


    i set path for environment varibales for C:\MingW\bin. still i am getting the same error.

    What should i do now.

    I am waiting for your reply.

    Regards,

    Narasimha Raju. Naidu

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

    Default Re: Problem Wtih Connecting MySQL Database on Windows

    are dlltool & impdef located in MINGWDIR\bin directory?
    if you do this in command prompt
    SET PATH=C:\MinGW\bin;%PATH%
    and then repeate instructions, will you get errors?
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  13. #13
    Join Date
    Feb 2009
    Posts
    39
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem Wtih Connecting MySQL Database on Windows

    Thanks for your reply,

    I did all the instructions what you mailed me. i am getting the following errors

    Qt Code:
    1. C:\Qt\4.3.4\src\plugins\sqldrivers\mysql>qmake "INCLUDEPATH+=C:\progra~1\MySQL\M
    2. ySQL Server 5.0\include" "LIBS+=C:\progra~1\MySQL\MySQL Server 5.0\lib\opt\libmy
    3. sql.a" mysql.pro
    4.  
    5. C:\Qt\4.3.4\src\plugins\sqldrivers\mysql>mingw32-make
    6. mingw32-make -f Makefile.Release
    7. mingw32-make[1]: Entering directory `C:/Qt/4.3.4/src/plugins/sqldrivers/mysql'
    8. g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT
    9. -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_NO_DEBUG -DQT_PLUGIN
    10. -DQT_SQL_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -
    11. I"..\..\..\..\include\QtCore" -I"..\..\..\..\include\QtSql" -I"..\..\..\..\inclu
    12. de\QtSql" -I"..\..\..\..\include" -I"c:\progra~1\MySQL\MySQL" -I"Server" -I"5.0\
    13. include" -I"c:\Qt\4.3.4\include\ActiveQt" -I"tmp\moc\release_shared" -I"." -I"..
    14. \..\..\..\mkspecs\win32-g++" -o tmp\obj\release_shared\main.o main.cpp
    15. In file included from main.cpp:46:
    16. ../../../sql/drivers/mysql/qsql_mysql.h:54:19: mysql.h: No such file or director
    17. y
    18. In file included from main.cpp:46:
    19. ../../../sql/drivers/mysql/qsql_mysql.h:105: error: expected `)' before '*' toke
    20. n
    21. mingw32-make[1]: *** [tmp/obj/release_shared/main.o] Error 1
    22. mingw32-make[1]: Leaving directory `C:/Qt/4.3.4/src/plugins/sqldrivers/mysql'
    23. mingw32-make: *** [release] Error 2
    To copy to clipboard, switch view to plain text mode 

    I am waiting for your reply.

    Regards,

    Narasimha Raju. Naidu

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

    Default Re: Problem Wtih Connecting MySQL Database on Windows

    looks like you have spaces in path to MySQL
    ...
    C:\progra~1\MySQL\MySQL Server 5.0
    ...
    reinstall MySQL and remove spaces and then try all steps again.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  15. #15
    Join Date
    Feb 2009
    Posts
    39
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem Wtih Connecting MySQL Database on Windows

    Thanks for your reply,


    I have uninstalled MySQL Server and reinstalled with simple path C:\progra~1\mysql\. Then i tried all the steps, till last step all are successfully finished. While executing final step i am getting the following error.

    Qt Code:
    1. C:\Qt\4.3.4\src\plugins\sqldrivers\mysql>qmake "INCLUDEPATH+=C:\progra~1\MySQL\i
    2. nclude" "LIBS+=C:\progra~1\MySQL\lib\opt\libmysql.a" mysql.pro
    3.  
    4. C:\Qt\4.3.4\src\plugins\sqldrivers\mysql>mingw32-make
    5. mingw32-make -f Makefile.Release
    6. mingw32-make[1]: Entering directory `C:/Qt/4.3.4/src/plugins/sqldrivers/mysql'
    7. g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT
    8. -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_NO_DEBUG -DQT_PLUGIN
    9. -DQT_SQL_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -
    10. I"..\..\..\..\include\QtCore" -I"..\..\..\..\include\QtSql" -I"..\..\..\..\inclu
    11. de\QtSql" -I"..\..\..\..\include" -I"c:\progra~1\MySQL\include" -I"c:\Qt\4.3.4\i
    12. nclude\ActiveQt" -I"tmp\moc\release_shared" -I"." -I"..\..\..\..\mkspecs\win32-g
    13. ++" -o tmp\obj\release_shared\main.o main.cpp
    14. g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT
    15. -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_NO_DEBUG -DQT_PLUGIN
    16. -DQT_SQL_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -
    17. I"..\..\..\..\include\QtCore" -I"..\..\..\..\include\QtSql" -I"..\..\..\..\inclu
    18. de\QtSql" -I"..\..\..\..\include" -I"c:\progra~1\MySQL\include" -I"c:\Qt\4.3.4\i
    19. nclude\ActiveQt" -I"tmp\moc\release_shared" -I"." -I"..\..\..\..\mkspecs\win32-g
    20. ++" -o tmp\obj\release_shared\qsql_mysql.o ..\..\..\sql\drivers\mysql\qsql_mysql
    21. .cpp
    22. C:/Qt/4.3.4/bin/moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_CAST_TO_ASCII -
    23. DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE
    24. _LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -I"..\..\..\..\include\Q
    25. tCore" -I"..\..\..\..\include\QtSql" -I"..\..\..\..\include\QtSql" -I"..\..\..\.
    26. .\include" -I"c:\progra~1\MySQL\include" -I"c:\Qt\4.3.4\include\ActiveQt" -I"tmp
    27. \moc\release_shared" -I"." -I"..\..\..\..\mkspecs\win32-g++" -D__GNUC__ -DWIN32
    28. ..\..\..\sql\drivers\mysql\qsql_mysql.h -o tmp\moc\release_shared\moc_qsql_mysql
    29. .cpp
    30. g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT
    31. -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_NO_DEBUG -DQT_PLUGIN
    32. -DQT_SQL_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -
    33. I"..\..\..\..\include\QtCore" -I"..\..\..\..\include\QtSql" -I"..\..\..\..\inclu
    34. de\QtSql" -I"..\..\..\..\include" -I"c:\progra~1\MySQL\include" -I"c:\Qt\4.3.4\i
    35. nclude\ActiveQt" -I"tmp\moc\release_shared" -I"." -I"..\..\..\..\mkspecs\win32-g
    36. ++" -o tmp\obj\release_shared\moc_qsql_mysql.o tmp\moc\release_shared\moc_qsql_m
    37. ysql.cpp
    38. windres -i qsqlmysql_resource.rc -o tmp\obj\release_shared\qsqlmysql_resource_re
    39. s.o --include-dir=.
    40. g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
    41. oc -Wl,-s -mthreads -Wl -shared -Wl,--out-implib,c:\Qt\4.3.4\plugins\sqldrivers\
    42. libqsqlmysql4.a -o ..\..\..\..\plugins\sqldrivers\qsqlmysql4.dll tmp/obj/release
    43. _shared/main.o tmp/obj/release_shared/qsql_mysql.o tmp/obj/release_shared/moc_qs
    44. ql_mysql.o -L"c:\Qt\4.3.4\lib" -L"c:\Qt\4.3.4\lib" tmp\obj\release_shared\qsqlm
    45. ysql_resource_res.o C:\progra~1\MySQL\lib\opt\libmysql.a -lQtSql4 -lQtCore4
    46. Creating library file: c:\Qt\4.3.4\plugins\sqldrivers\libqsqlmysql4.a
    47. tmp/obj/release_shared/qsql_mysql.o(.text+0x4c):qsql_mysql.cpp: undefined refere
    48. nce to `mysql_character_set_name@4'
    49. tmp/obj/release_shared/qsql_mysql.o(.text+0x184):qsql_mysql.cpp: undefined refer
    50. ence to `mysql_error@4'
    51. tmp/obj/release_shared/qsql_mysql.o(.text+0x19a):qsql_mysql.cpp: undefined refer
    52. ence to `mysql_errno@4'
    53. tmp/obj/release_shared/qsql_mysql.o(.text+0x6d7):qsql_mysql.cpp: undefined refer
    54. ence to `mysql_stmt_error@4'
    55. tmp/obj/release_shared/qsql_mysql.o(.text+0x6eb):qsql_mysql.cpp: undefined refer
    56. ence to `mysql_stmt_errno@4'
    57. tmp/obj/release_shared/qsql_mysql.o(.text+0xa25):qsql_mysql.cpp: undefined refer
    58. ence to `mysql_stmt_data_seek@12'
    59. tmp/obj/release_shared/qsql_mysql.o(.text+0xa39):qsql_mysql.cpp: undefined refer
    60. ence to `mysql_stmt_fetch@4'
    61. tmp/obj/release_shared/qsql_mysql.o(.text+0xb13):qsql_mysql.cpp: undefined refer
    62. ence to `mysql_data_seek@12'
    63. tmp/obj/release_shared/qsql_mysql.o(.text+0xb2a):qsql_mysql.cpp: undefined refer
    64. ence to `mysql_fetch_row@4'
    65. tmp/obj/release_shared/qsql_mysql.o(.text+0xc8f):qsql_mysql.cpp: undefined refer
    66. ence to `mysql_stmt_fetch@4'
    67. tmp/obj/release_shared/qsql_mysql.o(.text+0xcd7):qsql_mysql.cpp: undefined refer
    68. ence to `mysql_fetch_row@4'
    69. .
    70. .
    71. .
    72. .
    73. tmp/obj/release_shared/qsql_mysql.o(.text+0x6e70):qsql_mysql.cpp: undefined refe
    74. rence to `mysql_stmt_attr_set@12'
    75. tmp/obj/release_shared/qsql_mysql.o(.text+0x6e92):qsql_mysql.cpp: undefined refe
    76. rence to `mysql_stmt_store_result@4'
    77. tmp/obj/release_shared/qsql_mysql.o(.text+0x6edd):qsql_mysql.cpp: undefined refe
    78. rence to `mysql_stmt_bind_result@8'
    79. tmp/obj/release_shared/qsql_mysql.o(.text+0x738a):qsql_mysql.cpp: undefined refe
    80. rence to `mysql_stmt_bind_param@8'
    81. collect2: ld returned 1 exit status
    82. mingw32-make[1]: *** [..\..\..\..\plugins\sqldrivers\qsqlmysql4.dll] Error 1
    83. mingw32-make[1]: Leaving directory `C:/Qt/4.3.4/src/plugins/sqldrivers/mysql'
    84. mingw32-make: *** [release] Error 2
    85.  
    86. C:\Qt\4.3.4\src\plugins\sqldrivers\mysql>
    To copy to clipboard, switch view to plain text mode 

    Where i did mistake.

    Waiting for your reply.

    Regards,

    Narasimha Raju.Naidu

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

    Default Re: Problem Wtih Connecting MySQL Database on Windows

    C:\progra~1 looks like C:\Program Files, doesn't it?
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  17. #17
    Join Date
    Feb 2009
    Posts
    39
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem Wtih Connecting MySQL Database on Windows

    Thanks for your reply.

    C:\progra~1 is nothing but C:\Program File\


    Regards,

    Narasimha Raju. Naidu

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

    Default Re: Problem Wtih Connecting MySQL Database on Windows

    just install MySQL in <drive_name>:\MySQL.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  19. #19
    Join Date
    Feb 2009
    Posts
    39
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem Wtih Connecting MySQL Database on Windows

    Thanks for your reply,

    I uninstalled and installed at C:\MySQL\ and tried all the steps. I am getting the following errors

    Qt Code:
    1. C:\Qt\4.3.4\src\plugins\sqldrivers\mysql>qmake "INCLUDE+=C:\MySQL\include" "LIBS
    2. +=C:\MySQL\lib\opt\libmysql.a" mysql.pro
    3.  
    4. C:\Qt\4.3.4\src\plugins\sqldrivers\mysql>mingw32-make
    5. mingw32-make -f Makefile.Release
    6. mingw32-make[1]: Entering directory `C:/Qt/4.3.4/src/plugins/sqldrivers/mysql'
    7. g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
    8. oc -Wl,-s -mthreads -Wl -shared -Wl,--out-implib,c:\Qt\4.3.4\plugins\sqldrivers\
    9. libqsqlmysql4.a -o ..\..\..\..\plugins\sqldrivers\qsqlmysql4.dll tmp/obj/release
    10. _shared/main.o tmp/obj/release_shared/qsql_mysql.o tmp/obj/release_shared/moc_qs
    11. ql_mysql.o -L"c:\Qt\4.3.4\lib" -L"c:\Qt\4.3.4\lib" tmp\obj\release_shared\qsqlm
    12. ysql_resource_res.o C:\MySQL\lib\opt\libmysql.a -lQtSql4 -lQtCore4
    13. Creating library file: c:\Qt\4.3.4\plugins\sqldrivers\libqsqlmysql4.a
    14. tmp/obj/release_shared/qsql_mysql.o(.text+0x4c):qsql_mysql.cpp: undefined refere
    15. nce to `mysql_character_set_name@4'
    16. tmp/obj/release_shared/qsql_mysql.o(.text+0x184):qsql_mysql.cpp: undefined refer
    17. ence to `mysql_error@4'
    18. tmp/obj/release_shared/qsql_mysql.o(.text+0x19a):qsql_mysql.cpp: undefined refer
    19. ence to `mysql_errno@4'
    20. tmp/obj/release_shared/qsql_mysql.o(.text+0x6d7):qsql_mysql.cpp: undefined refer
    21. ence to `mysql_stmt_error@4'
    22. tmp/obj/release_shared/qsql_mysql.o(.text+0x6eb):qsql_mysql.cpp: undefined refer
    23. ence to `mysql_stmt_errno@4'
    24. tmp/obj/release_shared/qsql_mysql.o(.text+0xa25):qsql_mysql.cpp: undefined refer
    25. ence to `mysql_stmt_data_seek@12'
    26. tmp/obj/release_shared/qsql_mysql.o(.text+0xa39):qsql_mysql.cpp: undefined refer
    27. ence to `mysql_stmt_fetch@4'
    28. tmp/obj/release_shared/qsql_mysql.o(.text+0xb13):qsql_mysql.cpp: undefined refer
    29. ence to `mysql_data_seek@12'
    30. tmp/obj/release_shared/qsql_mysql.o(.text+0xb2a):qsql_mysql.cpp: undefined refer
    31. ence to `mysql_fetch_row@4'
    32. tmp/obj/release_shared/qsql_mysql.o(.text+0xc8f):qsql_mysql.cpp: undefined refer
    33. ence to `mysql_stmt_fetch@4'
    34. tmp/obj/release_shared/qsql_mysql.o(.text+0xcd7):qsql_mysql.cpp: undefined refer
    35. ence to `mysql_fetch_row@4'
    36. tmp/obj/release_shared/qsql_mysql.o(.text+0xd3f):qsql_mysql.cpp: undefined refer
    37. ence to `mysql_num_rows@4'
    38. tmp/obj/release_shared/qsql_mysql.o(.text+0xd7a):qsql_mysql.cpp: undefined refer
    39. ence to `mysql_stmt_num_rows@4'
    40. tmp/obj/release_shared/qsql_mysql.o(.text+0x1088):qsql_mysql.cpp: undefined refe
    41. rence to `mysql_fetch_lengths@4'
    42. tmp/obj/release_shared/qsql_mysql.o(.text+0x179c):qsql_mysql.cpp: undefined refe
    43. rence to `mysql_stmt_num_rows@4'
    44. tmp/obj/release_shared/qsql_mysql.o(.text+0x17b7):qsql_mysql.cpp: undefined refe
    45. rence to `mysql_num_rows@4'
    46. tmp/obj/release_shared/qsql_mysql.o(.text+0x17fe):qsql_mysql.cpp: undefined refe
    47. rence to `mysql_insert_id@4'
    48. tmp/obj/release_shared/qsql_mysql.o(.text+0x183d):qsql_mysql.cpp: undefined refe
    49. rence to `mysql_stmt_insert_id@4'
    50. tmp/obj/release_shared/qsql_mysql.o(.text+0x191e):qsql_mysql.cpp: undefined refe
    51. rence to `mysql_errno@4'
    52. tmp/obj/release_shared/qsql_mysql.o(.text+0x1936):qsql_mysql.cpp: undefined refe
    53. rence to `mysql_field_seek@8'
    54. tmp/obj/release_shared/qsql_mysql.o(.text+0x1944):qsql_mysql.cpp: undefined refe
    55. rence to `mysql_fetch_field@4'
    56. tmp/obj/release_shared/qsql_mysql.o(.text+0x19b4):qsql_mysql.cpp: undefined refe
    57. rence to `mysql_field_seek@8'
    58. tmp/obj/release_shared/qsql_mysql.o(.text+0x21f9):qsql_mysql.cpp: undefined refe
    59. rence to `mysql_close@4'
    60. tmp/obj/release_shared/qsql_mysql.o(.text+0x2b8c):qsql_mysql.cpp: undefined refe
    61. rence to `mysql_list_fields@12'
    62. tmp/obj/release_shared/qsql_mysql.o(.text+0x2bd5):qsql_mysql.cpp: undefined refe
    63. rence to `mysql_fetch_field@4'
    64. tmp/obj/release_shared/qsql_mysql.o(.text+0x2c3c):qsql_mysql.cpp: undefined refe
    65. rence to `mysql_free_result@4'
    66. tmp/obj/release_shared/qsql_mysql.o(.text+0x2db4):qsql_mysql.cpp: undefined refe
    67. rence to `mysql_query@8'
    68. tmp/obj/release_shared/qsql_mysql.o(.text+0x2f74):qsql_mysql.cpp: undefined refe
    69. rence to `mysql_query@8'
    70. tmp/obj/release_shared/qsql_mysql.o(.text+0x3134):qsql_mysql.cpp: undefined refe
    71. rence to `mysql_query@8'
    72. tmp/obj/release_shared/qsql_mysql.o(.text+0x37b0):qsql_mysql.cpp: undefined refe
    73. rence to `mysql_real_escape_string@16'
    74. tmp/obj/release_shared/qsql_mysql.o(.text+0x41fc):qsql_mysql.cpp: undefined refe
    75. rence to `mysql_init@4'
    76. tmp/obj/release_shared/qsql_mysql.o(.text+0x431c):qsql_mysql.cpp: undefined refe
    77. rence to `mysql_real_connect@32'
    78. tmp/obj/release_shared/qsql_mysql.o(.text+0x43d9):qsql_mysql.cpp: undefined refe
    79. rence to `mysql_select_db@8'
    80. tmp/obj/release_shared/qsql_mysql.o(.text+0x443b):qsql_mysql.cpp: undefined refe
    81. rence to `mysql_set_character_set@8'
    82. tmp/obj/release_shared/qsql_mysql.o(.text+0x4478):qsql_mysql.cpp: undefined refe
    83. rence to `mysql_get_client_version@0'
    84. tmp/obj/release_shared/qsql_mysql.o(.text+0x4492):qsql_mysql.cpp: undefined refe
    85. rence to `mysql_get_server_version@4'
    86. tmp/obj/release_shared/qsql_mysql.o(.text+0x494c):qsql_mysql.cpp: undefined refe
    87. rence to `mysql_close@4'
    88. tmp/obj/release_shared/qsql_mysql.o(.text+0x5170):qsql_mysql.cpp: undefined refe
    89. rence to `mysql_list_tables@8'
    90. tmp/obj/release_shared/qsql_mysql.o(.text+0x51a3):qsql_mysql.cpp: undefined refe
    91. rence to `mysql_data_seek@12'
    92. tmp/obj/release_shared/qsql_mysql.o(.text+0x51b1):qsql_mysql.cpp: undefined refe
    93. rence to `mysql_fetch_row@4'
    94. tmp/obj/release_shared/qsql_mysql.o(.text+0x5235):qsql_mysql.cpp: undefined refe
    95. rence to `mysql_free_result@4'
    96. .
    97. .
    98. .
    99. .
    100. tmp/obj/release_shared/qsql_mysql.o(.text+0x6de5):qsql_mysql.cpp: undefined refe
    101. rence to `mysql_stmt_affected_rows@4'
    102. tmp/obj/release_shared/qsql_mysql.o(.text+0x6e2d):qsql_mysql.cpp: undefined refe
    103. rence to `mysql_stmt_bind_result@8'
    104. tmp/obj/release_shared/qsql_mysql.o(.text+0x6e70):qsql_mysql.cpp: undefined refe
    105. rence to `mysql_stmt_attr_set@12'
    106. tmp/obj/release_shared/qsql_mysql.o(.text+0x6e92):qsql_mysql.cpp: undefined refe
    107. rence to `mysql_stmt_store_result@4'
    108. tmp/obj/release_shared/qsql_mysql.o(.text+0x6edd):qsql_mysql.cpp: undefined refe
    109. rence to `mysql_stmt_bind_result@8'
    110. tmp/obj/release_shared/qsql_mysql.o(.text+0x738a):qsql_mysql.cpp: undefined refe
    111. rence to `mysql_stmt_bind_param@8'
    112. collect2: ld returned 1 exit status
    113. mingw32-make[1]: *** [..\..\..\..\plugins\sqldrivers\qsqlmysql4.dll] Error 1
    114. mingw32-make[1]: Leaving directory `C:/Qt/4.3.4/src/plugins/sqldrivers/mysql'
    115. mingw32-make: *** [release] Error 2
    116.  
    117. C:\Qt\4.3.4\src\plugins\sqldrivers\mysql>
    To copy to clipboard, switch view to plain text mode 

    Waiting for your reply.

    Regards,

    Narasimha Raju. Naidu

  20. #20
    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: Problem Wtih Connecting MySQL Database on Windows

    Have you clean up your directory before building? Use make clean and also make yourself manually sure that there is no file left of a previous build! Then try again and send a full process output.

Similar Threads

  1. Replies: 19
    Last Post: 4th April 2009, 00:17
  2. Accessing xampp mysql database
    By synack in forum Newbie
    Replies: 8
    Last Post: 19th March 2009, 10:08
  3. MySQL starting problem
    By shamik in forum General Discussion
    Replies: 5
    Last Post: 25th April 2007, 08:20
  4. Qt in windows and mysql !!!
    By probine in forum Installation and Deployment
    Replies: 13
    Last Post: 9th December 2006, 08:42
  5. Deploying with MySQL support under Windows
    By KShots in forum Installation and Deployment
    Replies: 1
    Last Post: 12th October 2006, 10:19

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.