您的位置:首页 > 其它

解决 vc6 unresolved external symbol ___security_cookie 问题

2017-03-09 13:38 519 查看
vc6使用高版本编译器生成的lib时,编译不通过:

detours.lib(detours.obj) : error LNK2001: unresolved external symbol ___security_cookie

detours.lib(disasm.obj) : error LNK2001: unresolved external symbol ___security_cookie

detours.lib(detours.obj) : error LNK2001: unresolved external symbol __except_handler4

detours.lib(detours.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4

detours.lib(disasm.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4

 

加入下面代码可解决:

#if _MSC_VER < 1300 // 1200 == VC++ 6.0

extern "C"

{

 int __security_cookie = 0;     //比错误提示的名称少一个下划线

 void __fastcall __security_check_cookie(unsigned int cookie)  //参数个数要正确

 {

 }

 

 void * __cdecl _except_handler4(void *ExceptionRecord, void *EstablisherFrame, void *ContextRecord, void *DispatcherContext)

 {

  return 0;

 }

 //可根据提示继续添加....

};

#endif
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  vc security cookie
相关文章推荐