错误 MSB8040:此项目需要 Spectre-mitigated 库 [英] error MSB8040: Spectre-mitigated libraries are required for this project
问题描述
我有一个无法解决的问题.我的代码:
I have a problem that I cannot solve. My code:
#include "ntddk.h"
#include <stdlib.h>
NTSTATUS DriverEntry(IN PDRIVER_OBJECT theDriverObject,
IN PUNICODE_STRING theRegistryPath)
{
DbgPrint("Hello World!");
return STATUS_SUCCESS;
}
我的目标是运行这个程序没有任何问题.错误信息:
My goal is to run this program without any problems. Error message:
错误 MSB8040:为此需要 Spectre-mitigated 库项目.从 Visual Studio 安装程序安装它们(个人组件选项卡)用于任何正在使用的工具集和架构.学习更多:https://aka.ms/Ofhn4c
我添加了一些库,但错误仍然出现.添加的工具集:
I added some libraries but the error still apears. Added toolsets:
用于最新构建工具版本 142 (ARM) 的 C++ ATL
C++ ATL for the latest build tools version 142 (ARM)
有人可以一步一步指导我如何解决吗?
Could someone guide me step by step how to solve it?
推荐答案
这个:https://devblogs.microsoft.com/cppblog/spectre-mitigations-in-msvc 和 /Qspectre
编译器选项,可能是您要找的?(请注意,您需要使用 /Qspectre 以充分利用).
This: https://devblogs.microsoft.com/cppblog/spectre-mitigations-in-msvc and the /Qspectre
compiler option, is probably, what you are looking for? (Note that you'd need to recompile all code, including libraries you use, with /Qspectre to take full advantage).
这篇关于错误 MSB8040:此项目需要 Spectre-mitigated 库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!