【问题标题】:Kernel mode driver won't link in VS 2015内核模式驱动程序不会在 VS 2015 中链接
【发布时间】:2018-02-09 13:42:51
【问题描述】:

我有一个使用平台工具集 WindowsKernelModeDirver8.1 的 KMD。 该驱动程序编译链接,并使用 VS 2013 运行没有任何问题。 我正在运行 Windows 10。

当我尝试使用 VS 2015 编译它时,我收到以下链接错误。

1>LINK : 错误 LNK2001: 无法解析的外部符号 GsDriverEntry 1>terVertaPci.obj:错误 LNK2019:未解析的外部符号 __security_check_cookie 在函数 terVertaPciDevCtl 中引用 1>ntoskrnl.lib(gshandler.obj) : 错误 LNK2001: 无法解析的外部符号 __security_check_cookie 1>terVertaPci.obj : 错误 LNK2019: 函数 terVertaPciDevCtl 中引用的未解析的外部符号 __security_cookie

在我的 c++ 代码中的任何地方都找不到对未解析符号的引用。 似乎 VS 2015 链接的库与 VS 2013 不同,但是 我找不到任何有关差异的信息。我的组织有 宣布 VS 2015 为新标准,这就是我遇到此问题的原因。

我是处理 KMD 代码的新手。任何帮助将不胜感激。


在VS 2015第一次打开解决方案时,提示VC++ Compiler和Libraries需要升级,但是自动升级的结果是:

Configuration 'Win7 Debug|x64': no upgrade required. Platform Toolset is 'WindowsKernelModeDriver8.1'.
Configuration 'Win7 Release|x64': no upgrade required. Platform Toolset is 'WindowsKernelModeDriver8.1'.
TargetFrameworkVersion = v4.5 (was v4.5)

重定向结束:1 个完成,0 个失败,0 个跳过

【问题讨论】:

    标签: c++ visual-studio-2015 kmdf


    【解决方案1】:

    Visual Studio 2015 仅适用于 WDK for Windows 10 版本 1703。 它甚至不适用于 WindowsKernelModeDriver 8.1 虽然 8.1 是 PlatformToolset 中的一个选项。

    VS 2015 升级工具提示“无需升级”时不正确

    为 Windows 10 版本 1703 安装 WDK 并设置 PlatformToolset 因为 WindowsKernelModeDriver 10.0 解决了这个问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-11-19
      • 1970-01-01
      • 2018-07-29
      • 1970-01-01
      • 2016-06-10
      • 1970-01-01
      • 2018-05-07
      相关资源
      最近更新 更多