未解析的外部符号 __stdio_common_vswprintf [英] unresolved external symbol __stdio_common_vswprintf
问题描述
我正在编译使用 Microsoft Dmf 框架 (DmfK.lib) 的内核模式驱动程序
I'm compiling a kernel mode driver that uses the Microsoft Dmf framework (DmfK.lib)
在上次 Visual Studio 更新后出现了一些奇怪的链接器错误:
After the last Visual Studio update some strange linker errors appeared :
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关于"窗口中):
Here's the software and kits versions I use (shown in VS "About" windows):
- 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 ...
The second strange thing is that I've downloaded and installed the WDK 10.0.19041.685 but VS still displays 10.0.19030.1000 ...
可以在这里找到类似的问题:Linker error when编译windows内核模式驱动x64但还没解决.
A similar problem can be found here : Linker error when compiling windows kernel mode driver x64 but it hasn't been solved.
推荐答案
在包含任何标题之前设置此定义:
Set this define before including any headers:
#define _NO_CRT_STDIO_INLINE
或将其添加到编译器的命令行:
or add it to the compiler's command line:
-D_NO_CRT_STDIO_INLINE
我们(Microsoft 驱动程序团队)正在调查此问题,以了解是否需要消除此类解决方法.
We (Microsoft driver team) are looking into this issue to see about removing the need for such a workaround.
这篇关于未解析的外部符号 __stdio_common_vswprintf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!