How to solution the following error when build EmulatorPkg ?

2.6k Views Asked by At

when I run build -p EmulatorPkg\EmulatorPkg.dsc -t VS2019 -a X64, it show the following error

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

but when build MdeModulePkg/MdeModulePkg.dsc, it not have any error.

1

There are 1 best solutions below

0
On

The error was caused by missing support for VS2019 in this module.

Support was added upstream in commit 998d4c98b7c6 ("EmulatorPkg/WinHost: Add link flags for VS2019 tool chains.").