1
votes

Possible Duplicate:
linking problem: fatal error LNK1112: module machine type ‘x64’ conflicts with target machine type ‘X86’

I try to compile a project, let say Project_A, for x64 and receive an LNK1112 error like this

.\x64\Debug\Project_B.obj : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

Project_A depends on Project_B and uses its interfaces etc. My question is what of both projects is here the module machine and what the target machine? I am totally confused, because Project_B.obj in both output dirs are almost same. And compiling only Project_B succeeds. Any ideas?

1
It is a very common question. Type "lnk1112" in the search box at the upper right of this page and review the links at the right side of this page under the "Related" heading.Hans Passant

1 Answers

1
votes

It seems you are compiling your project for x64 and your project does use a library which target machine is x86. If you want your project compile for x64 machines, try reconfigure the library for x64 instead of x64. Otherwise, compile your project for x86.