Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. The best way to combine MinGW and MYSQL?
Forum Updated to NodeBB v4.3 + New Features

The best way to combine MinGW and MYSQL?

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
3 Posts 2 Posters 1.7k 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.
  • K Offline
    K Offline
    koahnig
    wrote on last edited by koahnig
    #1

    32 bit compilations are not supported everywhere anymore.

    After changing my desktop and the requirement to install everything fresh I have encountered yet another MYSQL driver problem with MinGW on win10 64 bit.

    I am still using Qt 5.4, but I can certainly change to a newer version. However, it does not solve my MYSQL problem. Since still only MinGW 32 bit compiler is used for prebuilds, it will not change anything.

    I have basically an application which is using MYSQL and it was working with Qt 5.4.2 and MYSQL. The new installers of MYSQL are always installing a 64 bit version. When I am using the libraries for bridging from QMYSQL to MYSQL, Qt returns an error that MYSQL is not installed. It does not really surprise me since I have a mix of 32 and 64 bit versions in use.

    I have tried to find a suitable 32 bit MYSQL driver set(up) without success.

    Since I have compiled Qt 5.9.x already with MinGW 64bit compiler, I started to add also the QMYSQL driver compilation with 64 bit MinGW, but failed.

    Did someone manage to find a solution path through the jungle of traps?

    Vote the answer(s) that helped you to solve your issue(s)

    K 1 Reply Last reply
    1
    • K koahnig

      32 bit compilations are not supported everywhere anymore.

      After changing my desktop and the requirement to install everything fresh I have encountered yet another MYSQL driver problem with MinGW on win10 64 bit.

      I am still using Qt 5.4, but I can certainly change to a newer version. However, it does not solve my MYSQL problem. Since still only MinGW 32 bit compiler is used for prebuilds, it will not change anything.

      I have basically an application which is using MYSQL and it was working with Qt 5.4.2 and MYSQL. The new installers of MYSQL are always installing a 64 bit version. When I am using the libraries for bridging from QMYSQL to MYSQL, Qt returns an error that MYSQL is not installed. It does not really surprise me since I have a mix of 32 and 64 bit versions in use.

      I have tried to find a suitable 32 bit MYSQL driver set(up) without success.

      Since I have compiled Qt 5.9.x already with MinGW 64bit compiler, I started to add also the QMYSQL driver compilation with 64 bit MinGW, but failed.

      Did someone manage to find a solution path through the jungle of traps?

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      After putting the issue aside for a couple of month I saw lately Qt5.12 will be available with MinGW 64 bit pre-built. This gave the impulse to take another look.

      Basically I got confused with the different bit versions and also which dlls to use. When I had tried to step back and continue with a more homogenous setup, I stumbled over the next problem e.g. compilation of MYSQL option for Qt with MinGW 64 bit compiler.

      Finally with the help of Qt5.12 beta pre-built and a structured approach I have succeeded in finding the proper MySQL lib/dll.

      With the current online installer of MySQL this is required:
      0_1540920609569_330c1a94-139b-45bd-8a47-cc92b9beb09c-image.png

      There one finds libmysql.dll and libmysql.lib which are required for use with 64 bit MinGW compiler. The important part is x64 for the 64 bit version.
      When looking for the 32 bit version the important indication is x86. This may be used with MinGW 32 bit compilers.

      The other tools installed for use with MySQL and their bit versions are irrelevant. A small test program based on the appropriate Qt kits can connect as 32 bit and 64 bit MinGW compilation to the same DB.

      Unfortunately has the reinstalled mysql on my machine a couple of different libmysql.dll and libmysql.lib, possibly they may work as well, but apparently I had messed up my installation with 32/64 bit installation.

      The only issue left is an SSL connection error for an external db, but that is covered in different thread.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      2
      • C Offline
        C Offline
        cawlfj
        wrote on last edited by
        #3

        hi koahning
        QT5.12.4 was released that version with SSL1.1.1.
        maybe build static lib of mysql is easy now.

        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