Re: Trouble building EmulatorPkg


Eugene Khoruzhenko
 

To build under VS2013 I had to add these two lines in \EmulatorPkg\Win\Host\WinHost.inf, for IA32 and X64 respectfully:

MSFT:*_VS2013_IA32_DLINK_FLAGS = /LIBPATH:"%VS2013_PREFIX%Lib" /LIBPATH:"%VS2013_PREFIX%VC\Lib" /LIBPATH:"%UniversalCRTSdkDir%lib\%UCRTVersion%\ucrt\x86" /LIBPATH:"%WindowsSdkDir%lib\%WindowsSDKLibVersion%\um\x86" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:I386 /LTCG Kernel32.lib MSVCRTD.lib Gdi32.lib User32.lib Winmm.lib Advapi32.lib

MSFT:*_VS2013_X64_DLINK_FLAGS = /LIBPATH:"%VS2013_PREFIX%VC\Lib\AMD64" /LIBPATH:"%UniversalCRTSdkDir%lib\%UCRTVersion%\ucrt\x64" /LIBPATH:"%WindowsSdkDir%lib\%WindowsSDKLibVersion%\um\x64" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:AMD64 /LTCG Kernel32.lib MSVCRTD.lib Gdi32.lib User32.lib Winmm.lib Advapi32.lib

With VS2013 and probably below, it turned out to be very important that an X64 build must start from either "VS2013 x64 Native Tools Command Prompt" or "VS2013 x64 Cross Tools Command Prompt"; an IA32 build would have to start in either "VS2013 x86 Native Tools Command Prompt" or "Developer Command Prompt for VS2013". My build was by default choosing "Developer Command Prompt" and I got build errors.

Join discuss@edk2.groups.io to automatically receive all group messages.