首页 > 解决方案 > 构建 EmulatorPkg 时出现如下错误如何解决?

问题描述

当我运行时build -p EmulatorPkg\EmulatorPkg.dsc -t VS2019 -a X64,它显示以下错误

LINK : warning LNK4108:ָ /ALIGN ûָ /DRIVERӳܲ
LINK : warning LNK4001: δָļʹÿ
LINK : warning LNK4068: δָ /MACHINEĬΪ X86
LINK : error LNK2001: ޷ⲿ _ModuleEntryPoint
d:\edk2\edk2\Build\EmulatorX64\DEBUG_VS2019\X64\WinHost.lib : fatal error LNK1120: 1 ޷ⲿ
NMAKE : fatal error U1077: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\
MSVC\14.25.28610\bin\Hostx86\x64\link.exe": ش롰0x460
Stop.
Building ... d:\edk2\edk2\EmulatorPkg\BootModePei\BootModePei.inf [X64]


build.py...
 : error 7000: Failed to execute command
        C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.25.28610\bin
\Hostx86\x86\nmake.exe /nologo tbuild [d:\edk2\edk2\Build\EmulatorX64\DEBUG_VS2019\X64\EmulatorPkg\Win
\Host\WinHost]


build.py...
 : error F002: Failed to build module
        d:\edk2\edk2\EmulatorPkg\Win\Host\WinHost.inf [X64, VS2019, DEBUG]

- Failed -
Build end time: 22:18:35, Apr.07 2020
Build total time: 00:00:13

但是在构建 MdeModulePkg/MdeModulePkg.dsc 时,它没有任何错误。

标签: uefiedk2

解决方案


该错误是由于此模块中缺少对 VS2019 的支持而引起的。

在提交 998d4c98b7c6 的上游添加了支持(“ EmulatorPkg/WinHost:为 VS2019 工具链添加链接标志。 ”)。


推荐阅读