Compiling MYSQL driver with qt error " Qt5Sql.lib(Qt5Sql.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'"
-
wrote on 19 Aug 2016, 12:21 last edited by Bongani
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 ?
-
wrote on 19 Aug 2016, 12:59 last edited by
The problem is that you are using a 32bit compiler. What compiler and OS are you building in?
-
wrote on 22 Aug 2016, 07:37 last edited by
How do you initialise your compiler? you should call
vcvarsall.bat amd64
to use the 64bit compiler -
5/5