To use WDK in VS2019, which Spectre-mitigated library should be installed

冷暖自知 提交于 2021-02-05 11:23:06

问题


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://docs.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?


回答1:


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)


来源:https://stackoverflow.com/questions/58811910/to-use-wdk-in-vs2019-which-spectre-mitigated-library-should-be-installed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!