1
votes

I've got VS2012 and QT add-in. I can compile in release x64 mode, but when I change settings to Win32 and compile, such error appears:

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

I tried to upload this dll file, but still have problem. Could someone please help here?

2
To build for 32bit, you'll need a 32bit build of Qt. - Frank Osterfeld
The build of Qt that you use is a 64-bit one. You need to build (or download, if available) 32-bit Qt and use that. - Kuba hasn't forgotten Monica
Is this still unresolved one year later?? - lpapp
no more actions are needed although attempts with 32-bit Qt didn't help - gen_next

2 Answers

1
votes

If you do this in 64 bit machine, you need to install both 32 bit and 64 it qt. Then you will need Qt add on to visual studio. In vs, there is a menu "QT", in there "QT Options", then pick which QT to use for each compilation.

1
votes

As others already pointed out, when you are trying to build a 32 bit binary, you will need the corresponding 32 bit Qt libraries. You can have the 32 and 64 bit installations simultaneously, but please be careful about not mixing them up in random situations.

If you go to the Qt download page, you will see the VS2012 download options for Qt 5, so select the version you need, download it, and then install.

This is the only available variant for you:

Qt 5.2.1 for Windows 32-bit (VS 2012, 541 MB)

If that is not good enough (I think it should), then you can also build Qt yourself based on the following instructions:

Building Qt 5 from Git

Note that you could also build from tarball, and the steps would be very similar.