gpt4 book ai didi

c++ - LNK1113 : invalid machine type 0x1C0

转载 作者:行者123 更新时间:2023-11-30 18:12:45 25 4
gpt4 key购买 nike

在 VS2012 中构建项目时,我收到链接错误

LNK1113:无效机器类型 0x1C0

我不确定在哪里检查以及会出现什么错误。任何帮助,将不胜感激。

谢谢

最佳答案

用两分钟谷歌搜索“如何在 Visual Studio 中设置模块机器类型”

产生以下信息,可在以下位置找到:

<http://stackoverflow.com/questions/3563756/fatal-error-lnk1112-module-machine-type-x64-conflicts-with-target-machine-typ>



Check your properties options in your linker settings at:
Properties > Configuration Properties > Linker > Advanced > Target Machine.
Select MachineX64 if you are targeting a 64 bit build,
or MachineX86 if you are making a 32 bit build.

Select Build > Configuration Manager
from the main menu in visual studio.
Make sure your project has the correct platform specified.
It is possible for the IDE to be set to build x64
but an individual project in the solution can be set to target win32.
So yeah, visual studio leaves a lot of rope to hang yourself,
but that's life.

Check your library files
that they really are of the type of platform are targeting.
This can be used by using dumpbin.exe
which is in your visual studio VC\bin directory.
use the -headers option to dump all your functions.
Look for the machine entry for each function.
it should include x64 if it's a 64 bit build.

In visual studio, select
Tools > Options from the main menu.
select Projects and Solutions > VC++ Directories.
Select x64 from the Platform dropdown.
Make sure that the first entry is:
$(VCInstallDir)\bin\x86_amd64
followed by $(VCInstallDir)\bin.

Once I did step 4 everything worked again for me.
The thing was I was encountering this problem on all my projects
where I wanted to compile towards a 64 bit target.

关于c++ - LNK1113 : invalid machine type 0x1C0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31685649/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com