error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' [duplicate]

心不动则不痛 提交于 2019-12-11 04:30:37

问题


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 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.



来源:https://stackoverflow.com/questions/14235014/error-lnk1112-module-machine-type-x64-conflicts-with-target-machine-type-x86

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!