Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. MySql plugin for windows
Forum Updated to NodeBB v4.3 + New Features

MySql plugin for windows

Scheduled Pinned Locked Moved General and Desktop
14 Posts 8 Posters 12.6k Views 1 Watching
  • 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.
  • A Offline
    A Offline
    Aicou
    wrote on last edited by
    #5

    I followed this link before trying with Qtcreator,
    It generate the makefile, the makefile.debug and makefile.release but when i use mingw32-make on it I got this:

    @Makefile.Debug:61: *** missing separator. Stop.
    mingw32-make[1]: Leaving directory `C:/QtSDK/QtSources/4.7.3/src/plugins/sqldrivers/mysql'
    mingw32-make: *** [debug] Error 2@

    the corresponding line on makefile.debug is :

    @{......\sql\drivers\mysql}.cpp{debug}.obj::
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fodebug\ @<<
    $<
    <<@

    (line 4 here)

    1 Reply Last reply
    0
    • A Offline
      A Offline
      aurorius
      wrote on last edited by
      #6

      Try reading this post: "Enabling MySQL Plugin":http://www.pikopong.com/blog/2011/07/11/how-to-enable-mysql-support-in-qt-sdk-for-windows-part-2/

      New URL: http://ieatbinary.com/2011/07/11/how-to-enable-mysql-support-in-qt-sdk-for-windows/

      1 Reply Last reply
      0
      • U Offline
        U Offline
        ucomesdag
        wrote on last edited by
        #7

        [quote author="aurorius" date="1310598231"]Try reading this post: "Enabling MySQL Plugin":http://www.pikopong.com/blog/2011/07/11/how-to-enable-mysql-support-in-qt-sdk-for-windows-part-2/[/quote]Just one remark on the the howto you refer to. It would be cleaner to copy libmysql.dll to the bin directory where all the Qt dll's live.

        Don't forget to distibute libmysql.dll with your executable and ship qsqlmysql4.dll in the subdirectory sqldrivers (relative to your executables root)

        Write “Qt”, not “QT” (QuickTime).

        1 Reply Last reply
        0
        • P Offline
          P Offline
          p91paul
          wrote on last edited by
          #8

          the tutorial says that you have to copy libmysql.dll in C:\Windows; in fact I have copied it in Qt/Desktop/Qt/4.7.3/mingw/bin and it works without using system directories. When deploying, you have to follow ucomesdag advice.

          1 Reply Last reply
          0
          • C Offline
            C Offline
            Cayan
            wrote on last edited by
            #9

            [quote author="aurorius" date="1310598231"]Try reading this post: "Enabling MySQL Plugin":http://www.pikopong.com/blog/2011/07/11/how-to-enable-mysql-support-in-qt-sdk-for-windows-part-2/[/quote]

            Thanks!!! The first tutorial which worked perfectly!!!
            The finest!
            Thanks once again!!

            1 Reply Last reply
            0
            • D Offline
              D Offline
              dmitrij
              wrote on last edited by
              #10

              Actually it doesn't=) Because there is no such command as reimp or may be in qt command promt what I have is something wrong............

              1 Reply Last reply
              0
              • C Offline
                C Offline
                Cayan
                wrote on last edited by
                #11

                There is no need to reimp a thing... check the tutorial

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  dmitrij
                  wrote on last edited by
                  #12

                  I did it. So I got the following result:

                  E:\QtSDK\QtSources\4.7.4\src\plugins\sqldrivers\mysql>mingw32-make
                  mingw32-make -f Makefile.Debug
                  mingw32-make[1]: Entering directory E:/QtSDK/QtSources/4.7.4/src/plugins/sqldrivers/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_ ngw\include\QtCore" -I"e:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql" -I"e:\QtSDK\Desktop\Qt\4.7.4\mingw\include" -I"c:\PROGRA~2\MySQL\MYSQLS~1.5\inclu In file included from ../../../sql/drivers/mysql/qsql_mysql.h:52, from main.cpp:44: e:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql/mysql.h:70:27: error: mysql_version.h: No such file or directory e:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql/mysql.h:71:23: error: mysql_com.h: No such file or directory e:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql/mysql.h:72:24: error: mysql_time.h: No such file or directory e:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql/mysql.h:74:70: error: my_list.h: No such file or directory e:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql/mysql.h:132:21: error: typelib.h: No such file or directory e:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql/mysql.h:147:22: error: my_alloc.h: No such file or directory In file included from ../../../sql/drivers/mysql/qsql_mysql.h:52, from main.cpp:44: e:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql/mysql.h:115: error: use of enum 'enum_field_types' without previous declaration e:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql/mysql.h:153: error: 'MEM_ROOT' does not name a type e:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql/mysql.h:260: error: 'NET' does not name a type e:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql/mysql.h:266: error: 'MEM_ROOT' does not name a type e:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql/mysql.h:285: error: 'SCRAMBLE_LENGTH' was not declared in this scope e:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql/mysql.h:302: error: ISO C++ forbids declaration of 'LIST' with no type e:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql/mysql.h:302: error: expected ';' before '*' token e:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql/mysql.h:326: error: 'MEM_ROOT' does not name a type e:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql/mysql.h:350: error: 'NET' does not name a type e:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql/mysql.h:518: error: use of enum 'mysql_enum_shutdown_level' without previous declaration e:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql/mysql.h:525: error: use of enum 'enum_mysql_set_option' without previous declaration e:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql/mysql.h:662: error: 'NET' has not been declared e:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql/mysql.h:673: error: use of enum 'enum_field_types' without previous declaration e:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql/mysql.h:685: error: 'MEM_ROOT' does not name a type e:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql/mysql.h:686: error: 'LIST' does not name a type e:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql/mysql.h:714: error: 'MYSQL_ERRMSG_SIZE' was not declared in this scope e:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql/mysql.h:715: error: 'SQLSTATE_LENGTH' was not declared in this scope e:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql/mysql.h:757: error: use of enum 'enum_server_command' without previous declaration mingw32-make[1]: *** [debug/main.o] Error 1 mingw32-make[1]: Leaving directory E:/QtSDK/QtSources/4.7.4/src/plugins/sqldrivers/mysql'
                  mingw32-make: *** [debug] Error 2

                  E:\QtSDK\QtSources\4.7.4\src\plugins\sqldrivers\mysql>

                  1 Reply Last reply
                  0
                  • C Offline
                    C Offline
                    Cayan
                    wrote on last edited by
                    #13

                    The problem is with your SQL Library, it was not properly included into the project.

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      dmitrij
                      wrote on last edited by
                      #14

                      Thank you for you answers.
                      I guess, I have to install qt and mysql on the same disk and see, what will happen. Because in command prompt for some reason I can't change the disk letter. May be only problem was in a drive letter. I'm not sure. In linux it wasn't that hard.

                      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