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. QMySQL , can't build it..
Forum Updated to NodeBB v4.3 + New Features

QMySQL , can't build it..

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 3 Posters 705 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.
  • U Offline
    U Offline
    U7Development
    wrote on last edited by
    #1

    Hi!..
    I'm having troubles while building QMySQL plugin on Windows | Mac, problem is that i cant find any documentation or tutorial how to do it, i follow the official tutorial from Qt Docs, but when try to execute this line:

    nmake sub-mysql

    it says nmake is not a command, ok, i use mingw32 so :

    mingw32-make sub-mysql

    but it says that is no rule to build target.

    Any help?..
    thanks

    1 Reply Last reply
    0
    • Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @U7Development said in QMySQL , can't build it..:

      Any help?..

      Read the docs

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      1
      • U Offline
        U Offline
        U7Development
        wrote on last edited by
        #3

        My friend, those were exactly the step i followed..
        i got problems:

        mingw32-make sub-mysql

        but it says that is no rule to build target

        1 Reply Last reply
        0
        • Christian EhrlicherC Online
          Christian EhrlicherC Online
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @U7Development said in QMySQL , can't build it..:

          those were exactly the step i followed..

          So what was the output? Please start over by removing all generated files and post the output.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          0
          • U Offline
            U Offline
            U7Development
            wrote on last edited by U7Development
            #5

            According to docs i need to install mysql web community and install it specially C Connector 6.1, right, that is installed successfully.

            The required files are present on my machine :
            <MySQL dir>/lib/libmysql.lib
            <MySQL dir>/lib/libmysql.dll
            <MySQL dir>/include/mysql.h

            Then i execute the next commands:

            1. cd %QTDIR%\qtbase\src\plugins\sqldrivers

            2. qmake -- MYSQL_INCDIR="C:/Program Files/MySQL/MySQL Connector C 6.1/include" MYSQL_LIBDIR="C:/Program Files/MySQL/MySQL Connector C 6.1/lib"

            3. nmake sub-mysql

            4. nmake install

            Command 1 is OK
            Command 2 prints out a configuration summary wish says that MySql driver is set to "no" (i don't know if it is really fine)

            Since i don't own nmake, i need to switch to mingw32-make:

            Command 3 get this error:
            mingw32-make: *** No rule to make target 'sub-mysql'. Stop.

            Either i can not finish well this command, i have not continued to execute command 4...


            Edit : I noticed i can use ODBC to connect to MySql too.. is there any difference between this and native plugin?

            1 Reply Last reply
            0
            • Christian EhrlicherC Online
              Christian EhrlicherC Online
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by Christian Ehrlicher
              #6

              @U7Development said in QMySQL , can't build it..:

              Command 2 prints out a configuration summary wish says that MySql driver is set to "no" (i don't know if it is really fine)

              Are you serious? What else should be printed out that the driver can not be build?

              So take a look into config.log (as explained in the docs) and see why the driver could not be build.

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              1 Reply Last reply
              1
              • H Offline
                H Offline
                hehedaozuiteng
                wrote on last edited by hehedaozuiteng
                #7

                Trying this one? I used meet the same problem.
                https://forum.qt.io/topic/110176/build-qmysql-driver-under-windows-10-a-sample-solution-for-qsqldatabase-qmysql-driver-not-loaded/15

                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