Sam
Sam

Reputation: 949

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

I am copiling vtk using msvc10. I first used cmake and then opened ALL_BUILD to compile VTK. I get this error:

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

I finally got me this: ========== Build: 118 succeeded, 6 failed, 0 up-to-date, 0 skipped ==========

I found some pages that suggest I should use win32 or..., however, I don't have Linker to do so. Is there any other solution?

Upvotes: 3

Views: 886

Answers (1)

Hi-Angel
Hi-Angel

Reputation: 5620

You're trying to do a x64 build while some of your libraries to link are x32. There are two ways to fix it:

α) Either you have to find which libraries are 32 bit (you can guess it from linker errors), and replace these with x64, either

β) You have to change a build type to 32 bit. To do it you have to add in a makefile to a variables like CFLAGS, CPPFLAGS,CXXFLAGS, LDFLAGS (any of it you can find) an option to switch build type to 32 bit. I.e. in GCC it is -m32 — not sure, how it looks like in MSVC.

For the latest — unlikely that could happen that some of your libs would be only x64. I suspect that the only x64 libraries here — the ones with your compiler, and these usually have a x32 alternative. Though who knows…

Upvotes: 1

Related Questions