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

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

问题描述

我正在使用cmake-2.8.9-win32-x86.我想在Visual Studio 2010上构建Qt qt-win-opensource-4.8.2-vs2010.我的计算机具有64位系统.我认为既然cmake或qt是x86,我在构建时都会遇到此错误. LNK1112模块机器类型"X86"与目标机器类型"x64"冲突.

I'm using cmake-2.8.9-win32-x86. I wanted to build Qt qt-win-opensource-4.8.2-vs2010 on visual studio 2010. My computer has 64 bit system. I think since either cmake or qt is x86 I'm taking this error while building. LNK1112 module machine type 'X86' conflicts with target machine type 'x64'.

该如何解决?

推荐答案

该错误告诉您链接器已经使用

The error is telling you that the linker has been run with a target that specifies x64 while the module the linker is reading was created for x86. What's wrong depends on what you are trying to do.

如果您尝试创建x64代码文件,则链接器目标正确,模块错误.如果您尝试创建x86代码文件,则链接器目标错误并且模块正确.

If you are trying to create an x64 code file then the linker target is correct and the module is wrong. If you are trying to create an x86 code file then the linker target is wrong and the module is correct.

其中一项是错误的,您必须更正该错误-通过更改链接器目标或通过更改模块.如果模块错误,则您可能最终使用x86版本的编译器而不是x64版本进行编译.

Whichever item is wrong is the one you have to correct - either by changing the linker target or by changing the module. If the module is wrong you probably ended up compiling it with the x86 version of the compiler rather than the x64 version.

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

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