当我运行build -p EmulatorPkgEmulatorPkg.dsc -t VS2019 -a X64
时,它显示以下错误
LINK : warning LNK4108:ָ /ALIGN ûָ /DRIVERӳܲ
LINK : warning LNK4001: δָļʹÿ
LINK : warning LNK4068: δָ /MACHINEĬΪ X86
LINK : error LNK2001: ⲿ _ModuleEntryPoint
d:edk2edk2BuildEmulatorX64DEBUG_VS2019X64WinHost.lib : fatal error LNK1120: 1 ⲿ
NMAKE : fatal error U1077: "C:Program Files (x86)Microsoft Visual Studio2019ProfessionalVCTools
MSVC14.25.28610binHostx86x64link.exe": ش롰0x460
Stop.
Building ... d:edk2edk2EmulatorPkgBootModePeiBootModePei.inf [X64]
build.py...
: error 7000: Failed to execute command
C:Program Files (x86)Microsoft Visual Studio2019ProfessionalVCToolsMSVC14.25.28610bin
Hostx86x86nmake.exe /nologo tbuild [d:edk2edk2BuildEmulatorX64DEBUG_VS2019X64EmulatorPkgWin
HostWinHost]
build.py...
: error F002: Failed to build module
d:edk2edk2EmulatorPkgWinHostWinHost.inf [X64, VS2019, DEBUG]
- Failed -
Build end time: 22:18:35, Apr.07 2020
Build total time: 00:00:13
但是当构建MdeModulePkg/MdeModulePkg.dsc时,它没有任何错误。
此错误是由于此模块中缺少对VS2019的支持而导致的。
在提交998d4c98b7c6的上游添加了支持("EmulatorPkg/WinHost:为VS2019工具链添加链接标志。"(。