本文介绍了错误LNK1112:模块机器类型"x64"与目标机器类型"X86"冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试为x64编译一个项目,比如说Project_A,并收到这样的LNK1112错误

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依赖于Project_B并使用其接口等.我的问题是,这两个项目中的哪些是模块计算机,什么是目标计算机?我完全感到困惑,因为两个输出目录中的Project_B.obj几乎相同.并且仅编译Project_B成功.有任何想法吗?

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?

推荐答案

似乎您正在为x64编译项目,并且您的项目确实使用了目标计算机为x86的库.如果要为x64机器编译项目,请尝试为x64而不是x64重新配置该库.否则,请为x86编译项目.

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.

这篇关于错误LNK1112:模块机器类型"x64"与目标机器类型"X86"冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 23:39