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. Compiling MYSQL driver with qt error " Qt5Sql.lib(Qt5Sql.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'"
Forum Updated to NodeBB v4.3 + New Features

Compiling MYSQL driver with qt error " Qt5Sql.lib(Qt5Sql.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'"

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 2.1k 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.
  • B Offline
    B Offline
    Bongani
    wrote on 19 Aug 2016, 12:21 last edited by Bongani
    #1

    I'm trying to compile or build qt sql drivers to be able to connect to the mysql database.

    I ran the following commands as instructed on the tutorial

    cd %QTDIR%\qtbase\src\plugins\sqldrivers\mysql
    qmake "INCLUDEPATH+=C:/MySQL/include" "LIBS+=C:/MYSQL/MySQL Server <version>/lib/opt/libmysql.lib" mysql.pro
    nmake
    
    

    I am getting this error:

    " Qt5Sql.lib(Qt5Sql.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'"
    
    

    I did download the 64bit version of the mysql library "mysql-5.7.14-winx64.zip" but i am still getting the same error.

    I even tried to install DB2 and install it but i am still getting the same error.

    Please help me on how to solve this ?

    1 Reply Last reply
    0
    • V Offline
      V Offline
      VRonin
      wrote on 19 Aug 2016, 12:59 last edited by
      #2

      The problem is that you are using a 32bit compiler. What compiler and OS are you building in?

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      2
      • B Offline
        B Offline
        Bongani
        wrote on 22 Aug 2016, 07:20 last edited by
        #3

        @VRonin I am using MSVC2015 64 bit on a 64 bit Windows 7.

        1 Reply Last reply
        0
        • V Offline
          V Offline
          VRonin
          wrote on 22 Aug 2016, 07:37 last edited by
          #4

          How do you initialise your compiler? you should call vcvarsall.bat amd64 to use the 64bit compiler

          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
          ~Napoleon Bonaparte

          On a crusade to banish setIndexWidget() from the holy land of Qt

          1 Reply Last reply
          1
          • B Offline
            B Offline
            Bongani
            wrote on 22 Aug 2016, 09:42 last edited by
            #5

            Thanks @VRonin, i ran vcvarsall.exe amd64 on the MSVC2015 command prompt to configure for x64 build. It compiled successfully.

            1 Reply Last reply
            0
            • J JoeBermejales referenced this topic on 13 Sept 2023, 12:13

            5/5

            22 Aug 2016, 09:42

            • Login

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