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

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

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


I finally got me: ========== Build: 118 succeeded, 6 failed, 0 updated, 0 skipped ==========

I found several pages that suggest I should be using win32 or ... however I don't have a Linker to do this. Is there any other solution?


source to share

1 answer

You are trying to build x64 and some of your link libraries are x32. There are two ways to fix this:

α) Either you have to find which libraries are 32 bit (you can guess linker errors) and replace them with x64, or

β) You must change the build type to 32 bits. To do this, you must add variables to the makefile such as CFLAGS, CPPFLAGS, CXXFLAGS, LDFLAGS (any of them you can find) to switch the build type to 32 bits. That is, in GCC it -m32

is - not sure how it looks in MSVC.

In the latter case, it is unlikely that some of your libs will be x64 only. I suspect that the only x64 libraries here are the ones with your compiler, and they usually have an x32 alternative. Although who knows ...



All Articles