未解析的外部符号__stdio_common_vswprintf

我正在编译使用 Microsoft Dmf 框架 (DmfK.lib) 的内核模式驱动程序

在上次 Visual Studio 更新之后,出现了一些奇怪的链接器错误:

EmulationTargetPDO.obj : error LNK2019: unresolved external symbol __stdio_common_vswprintf referenced in function _vsnwprintf_l
Utilities.lib(savedata.obj) : error LNK2001: unresolved external symbol __stdio_common_vswprintf
DmfK.lib(DmfUtility.obj) : error LNK2001: unresolved external symbol __stdio_common_vswprintf
EmulationTargetPDO.obj : error LNK2019: unresolved external symbol __stdio_common_vsprintf referenced in function _vsnprintf_l
DmfK.lib(DmfCore.obj) : error LNK2001: unresolved external symbol __stdio_common_vsprintf
DmfK.lib(Dmf_CrashDump.obj) : error LNK2019: unresolved external symbol __stdio_common_vsprintf_s referenced in function _vsprintf_s_l

这是我使用的软件和套件版本(显示在 VS“关于”窗口中):

  • Microsoft Visual Studio Professional 2019 版本 16.10.0
  • Windows SDK 10.0.19041.685
  • Windows 驱动程序工具包 10.0.19030.1000

第二个奇怪的是,我已经下载并安装了 WDK 10.0.19041.685 但 VS 仍然显示 10.0.19030.1000 ...

可以在这里找到类似的问题:编译 Windows 内核模式驱动程序 x64 时出现链接器错误,但尚未解决。

回答

在包含任何标题之前设置此定义:

#define _NO_CRT_STDIO_INLINE

或将其添加到编译器的命令行:

-D_NO_CRT_STDIO_INLINE

我们(Microsoft 驱动程序团队)正在调查此问题,以了解是否需要消除此类解决方法。


以上是未解析的外部符号__stdio_common_vswprintf的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>