错误 LNK1112:模块机器类型“x64"与目标机器类型“X86"冲突 [英] error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

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

问题描述

可能的重复:
链接问题:致命错误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

.x64DebugProject_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"冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆