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. PostgesSQL and MySQL drivers Qt 5.1.1
Forum Updated to NodeBB v4.3 + New Features

PostgesSQL and MySQL drivers Qt 5.1.1

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 1.8k 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.
  • B Offline
    B Offline
    bkerdev
    wrote on last edited by
    #1

    Hi,
    How can build postgres and mysql drivers for Qt 5.1.1 for windows.
    Thank for help me.

    Boris Bker

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Do you mean building the plugins ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bkerdev
        wrote on last edited by
        #3

        yes, i want to bulding plugins

        Boris Bker

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Then have a look "here":http://qt-project.org/doc/qt-5.0/qtsql/sql-driver.html it explains how to do it. You can also search the forum for this topic, it appeared several times

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • S Offline
            S Offline
            silicomancer
            wrote on last edited by
            #5

            This is the batch file we use for building the plugin. Maybe it helps you a little. It is executed from the Visual Studio Command Line.

            @
            echo Copy MySQL input files...

            copy "C:\MySQL\include\mysql.h" "%QTDIR%\include"
            copy "C:\MySQL\include\mysql_version.h" "%QTDIR%\include"
            copy "C:\MySQL\include\mysql_com.h" "%QTDIR%\include"
            copy "C:\MySQL\include\mysql_time.h" "%QTDIR%\include"
            copy "C:\MySQL\include\typelib.h" "%QTDIR%\include"
            copy "C:\MySQL\include\my_list.h" "%QTDIR%\include"
            copy "C:\MySQL\include\my_alloc.h" "%QTDIR%\include"

            copy "C:\MySQL\lib\libmysql.lib" "%QTDIR%\lib"
            copy "C:\MySQL\lib\libmysql.dll" "%QTDIR%\bin"

            echo Building MySQL plugin...

            cd /D "%QTDIR%..\src\qtbase\src\plugins\sqldrivers\mysql"
            nmake clean
            qmake "INCLUDEPATH+=C:/MySQL/include" "LIBS+=C:/MYSQL/lib/libmysql.lib" mysql.pro
            nmake debug
            nmake release

            echo Copy MySQL output files...

            cd /D "%QTDIR%..\src\qtbase\plugins\sqldrivers"

            copy qsqlmysqld.dll "%QTDIR%\plugins\sqldrivers"
            copy qsqlmysqld.lib "%QTDIR%\plugins\sqldrivers"

            copy qsqlmysql.dll "%QTDIR%\plugins\sqldrivers"
            copy qsqlmysql.lib "%QTDIR%\plugins\sqldrivers"
            @

            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