1

When using WDK in VS2019, I get this build error:

Error MSB8040: Spectre-mitigated libraries are required for this project

There are a lot of items in VS2019 setup that contains "spectre".

This https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk#wdk-for-windows-10-version-1903 says:

For each architecture you intend to build drivers for, install the Spectre mitigated libraries thru Individual Components -> Compilers, build tools, and runtimes -> MSVC v142 - VS 2019 C+ x64/x86 Spectre-mitigated libs (v14.21).

This https://developercommunity.visualstudio.com/content/problem/746245/spectre-mitigated-libraries-are-required-for-this.html says

I think you need to install the following components: MSVC V142 - VS 2019 C++ x64/x86 Spectre-mitigated libs (v14.xx) C++ ATL for latest v142 build tools with Spectre-mitigations (x86 & x64) C++ MFC for latest v142 build tools with Spectre-mitigations (x86 & x64)

Which to install?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
jw_
  • 1,663
  • 18
  • 32

1 Answers1

2

VS2019 toolset "WindowsKernelModeDriver10.0" (which you need to select to build driver projects) seems to use the highest version of C++ toolset that VS2019 supports.

For now the highest version is 14.23 so only need to install

MSVC v142 - VS 2019 C++ x64/x86 Spectre-mitigated libs (v14.23)
jw_
  • 1,663
  • 18
  • 32
  • In my case I had to install the "MSVC v142 - VS 2019 C++ x64/x86 Spectre-mitigated libs (latest)" variant. – Nebel22 Dec 09 '21 at 19:39