Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. MySQL driver problem [Solved]
QtWS25 Last Chance

MySQL driver problem [Solved]

Scheduled Pinned Locked Moved Installation and Deployment
21 Posts 4 Posters 13.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    wimschuiteman
    wrote on last edited by
    #12

    But now i have another error.!http://www.schuitemandev.nl/Images/Window1.jpg(Dos window)!

    Regards,
    Wim

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mlong
      wrote on last edited by
      #13

      Is your QtSDK installed in C:\QtSDK, or E:\QtSDK? Your first "set" command is using E: not C:

      And it's supposed to be "set QTDIR= " not "set QTDIR- "

      Also, it should be "set mySQLDIR= " not "set mSQLDIR- "

      And when you do the "cd", it should take you to whatever directory has the "mysql.pro", not remain in system32.

      Software Engineer
      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

      1 Reply Last reply
      0
      • W Offline
        W Offline
        wimschuiteman
        wrote on last edited by
        #14

        My QtSDK is installed in E:\QtSDK.
        I have found mysql.pro in the map "E:\QtSDK\QtSources\4.8.0\src\plugins\sqldrivers\mysql".
        libmysql.lib in the map C:\MySQL\MySQL51\lib\opt.
        !http://www.schuitemandev.nl/Images/Window2.jpg(Window)!

        Regards,
        Wim

        1 Reply Last reply
        0
        • W Offline
          W Offline
          wimschuiteman
          wrote on last edited by
          #15

          I saw that I had forgotten something.
          !http://www.schuitemandev.nl/Images/Window3.jpg(window)!

          Regards,
          Wim

          1 Reply Last reply
          0
          • W Offline
            W Offline
            wimschuiteman
            wrote on last edited by
            #16

            I think I'm one step further.

            but I get 2 errors.
            @Setting up environment for Qt usage...

            C:\Windows\system32>set QTDIR = C:\QtSDK\QtSource\4.7.4

            C:\Windows\system32>set mySQLDIR=C:\MySQL

            C:\Windows\system32>cd %QTDIR%\src\plugins\sqldrivers\mysql
            Het systeem kan het opgegeven pad niet vinden.

            C:\Windows\system32>cd C:\QtSDK\QtSource\4.7.4\src\plugins\sqldrivers\mysql
            Het systeem kan het opgegeven pad niet vinden.

            C:\Windows\system32>QTDIR=C:\QtSDK\QtSources
            QTDIR wordt niet herkend als een interne
            of externe opdracht, programma of batchbestand.

            C:\Windows\system32>set QTDIR=C:\QtSDK\QtSources\4.7.4

            C:\Windows\system32>set mySQLDIR=C:\MySQL

            C:\Windows\system32>cd %QTDIR%\src\plugins\sqldrivers\mysql

            C:\QtSDK\QtSources\4.7.4\src\plugins\sqldrivers\mysql>qmake "INCLUDEPATH+=%mySQL
            DIR%\include" "LIBS+=%mySQLDIR%\lib\opt\libmysql.lib"-o Makefile mysql.pro
            WARNING: (internal):1: Unescaped backslashes are deprecated.
            c:\QtSDK\QtSources\4.7.4\src\plugins\sqldrivers\mysql\Makefile:9: Parse Error ('
            first: debug')
            Error processing project file: Makefile
            WARNING: (internal):1: Unescaped backslashes are deprecated.
            WARNING: (internal):1: Unescaped backslashes are deprecated.
            WARNING: (internal):1: Unescaped backslashes are deprecated.

            C:\QtSDK\QtSources\4.7.4\src\plugins\sqldrivers\mysql>mingw32-make
            mingw32-make -f Makefile.Debug
            mingw32-make[1]: Entering directory C:/QtSDK/QtSources/4.7.4/src/plugins/sqldri vers/mysql' g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT - DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB - DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_H AVE_SSE2 -DQT_THREAD_SUPPORT -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql" -I"c:\QtSDK\Desktop\Qt\4.7.4\m ingw\include" -I"c:\MySQL\include" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\Ac tiveQt" -I"debug" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\default" -o debug\m ain.o main.cpp C:\QtSDK\Desktop\Qt\4.7.4\mingw\bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQ T_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB -DQ T_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAV E_SSE2 -DQT_THREAD_SUPPORT -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore" -I "c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql" -I"c:\QtSDK\Desktop\Qt\4.7.4\min gw\include" -I"c:\MySQL\include" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\Acti veQt" -I"debug" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\default" -D__GNUC__ - DWIN32 ..\..\..\sql\drivers\mysql\qsql_mysql.cpp -o debug\qsql_mysql.moc g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT - DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB - DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_H AVE_SSE2 -DQT_THREAD_SUPPORT -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql" -I"c:\QtSDK\Desktop\Qt\4.7.4\m ingw\include" -I"c:\MySQL\include" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\Ac tiveQt" -I"debug" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\default" -o debug\q sql_mysql.o ..\..\..\sql\drivers\mysql\qsql_mysql.cpp C:\QtSDK\Desktop\Qt\4.7.4\mingw\bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQ T_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB -DQ T_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAV E_SSE2 -DQT_THREAD_SUPPORT -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore" -I "c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql" -I"c:\QtSDK\Desktop\Qt\4.7.4\min gw\include" -I"c:\MySQL\include" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\Acti veQt" -I"debug" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\default" -D__GNUC__ - DWIN32 ..\..\..\sql\drivers\mysql\qsql_mysql.h -o debug\moc_qsql_mysql.cpp g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT - DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB - DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_H AVE_SSE2 -DQT_THREAD_SUPPORT -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql" -I"c:\QtSDK\Desktop\Qt\4.7.4\m ingw\include" -I"c:\MySQL\include" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include\Ac tiveQt" -I"debug" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\default" -o debug\m oc_qsql_mysql.o debug\moc_qsql_mysql.cpp windres -i qsqlmysqld_resource.rc -o debug\qsqlmysqld_resource_res.o --include-d ir=. -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_AS CII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNO W -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT g++ -mthreads -shared -Wl,--out-implib,debug\libqsqlmysqld4.a -o debug\qsqlmysql d4.dll debug/main.o debug/qsql_mysql.o debug/moc_qsql_mysql.o -L"c:\QtSDK\Deskt op\Qt\4.7.4\mingw\lib" debug\qsqlmysqld_resource_res.o C:\MySQL\lib\opt\libmysql .lib-o -lQtSqld4 -lQtCored4 g++: C:\MySQL\lib\opt\libmysql.lib-o: No such file or directory mingw32-make[1]: *** [debug\qsqlmysqld4.dll] Error 1 mingw32-make[1]: Leaving directory C:/QtSDK/QtSources/4.7.4/src/plugins/sqldriv
            ers/mysql'
            mingw32-make: *** [debug] Error 2

            C:\QtSDK\QtSources\4.7.4\src\plugins\sqldrivers\mysql>@

            Regards,
            Wim

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Skyrim
              wrote on last edited by
              #17

              error in 24 line
              you line:
              @
              DIR%\include" "LIBS+=%mySQLDIR%\lib\opt\libmysql.lib"-o Makefile mysql.pro
              @
              must be
              @
              DIR%\include" "LIBS+=%mySQLDIR%\lib\opt\libmysql.lib" -o Makefile mysql.pro //need space before -o
              @

              1 Reply Last reply
              0
              • W Offline
                W Offline
                wimschuiteman
                wrote on last edited by
                #18

                Hello
                I now work.
                I have Qt 4.8.0 removes. And 4.7.4. installed.
                Thanks everyone for the responses.

                Wim

                Regards,
                Wim

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  Skyrim
                  wrote on last edited by
                  #19

                  Congratulations on your victory!

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    mlong
                    wrote on last edited by
                    #20

                    Be sure and edit your original post to add [Solved] to the title. Thanks!

                    Software Engineer
                    My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

                    1 Reply Last reply
                    0
                    • Z Offline
                      Z Offline
                      zhuyeat
                      wrote on last edited by
                      #21

                      hello:

                      why my i have no QtSource subfolder under QtSDK folder and have no mysql sobfolder under sqldrivers folder? thank you!

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved