VS2010 在编译一个驱动时出现无法解析的外部符号 的解决方法

来源:互联网 发布:坛水墨水官网淘宝 编辑:程序博客网 时间:2024/04/29 08:26

今天在用VS2010编译一个驱动时出现 :

1>MSVCRT.LIB(gs_report.obj) : error LNK2019: 无法解析的外部符号 __imp__TerminateProcess@8,该符号在函数 ___report_gsfailure 中被引用     1>MSVCRT.LIB(gs_report.obj) : error LNK2019: 无法解析的外部符号 __imp__GetCurrentProcess@0,该符号在函数 ___report_gsfailure 中被引用     1>MSVCRT.LIB(gs_report.obj) : error LNK2019: 无法解析的外部符号 __imp__UnhandledExceptionFilter@4,该符号在函数 ___report_gsfailure 中被引用     1>MSVCRT.LIB(gs_report.obj) : error LNK2019: 无法解析的外部符号 __imp__SetUnhandledExceptionFilter@4,该符号在函数 ___report_gsfailure 中被引用     1>MSVCRT.LIB(gs_report.obj) : error LNK2019: 无法解析的外部符号 __imp__IsDebuggerPresent@0,该符号在函数 ___report_gsfailure 中被引用


从上面看是引用的MSVCRT.LIB出现冲突,于是把VS2010里链接器 下面的 附加依赖库 中的 MSVCRT.LIB 去掉后编译出现如下错误:

1>wdmsec.lib(chandler4.obj) : error LNK2019: 无法解析的外部符号 @__security_check_cookie@4,该符号在函数 _ValidateLocalCookies 中被引用
1>wdmsec.lib(exsup4.obj) : error LNK2001: 无法解析的外部符号 @__security_check_cookie@4

采用WDK编译 发现编译正常,经对比WDK编译生成的LOG文件,发现调用了BufferOverflowK.lib 和sehupd.lib 这个库,把这两个库加到附加依赖库里再次编译,没有出再无法解析的外部符号.

0 0
原创粉丝点击