error C2065: '_Hash_compare' : undeclared identifier
来源:互联网 发布:卖空日本 淘宝店真假 编辑:程序博客网 时间:2024/06/05 02:59
今天用VS 2008编译一个C++工程,出现错误:
error C2065: '_Hash_compare' : undeclared identifier
调查发现头文件VC\include\xhash文件日期比别人的旧,还缺少_Hash_compare的定义。
初步怀疑VC的头文件被旧的Microsoft Windows SDK覆盖了,导致错误。
查看SDK版本历史:
http://en.wikipedia.org/wiki/Microsoft_Windows_SDK#Versions
发现SDK "Included in Visual Studio 2008",即VS 2008自带的SDK,版本号是v6.0a,Build号是6.1.6723.1,发布日期是2007-11-19。
而Windows Server 2008 & .NET 3.5 SDK版本号是v6.1,Build号是6.0.6001.18000.367,发布日期是2008-02-05。
Build号旧的,发布日期反而新,果然是用旧的头文件覆盖了新的。
解决办法:重新安装VS 2008 SP1。
可能安装最新版本的SDK也可以解决。下载链接:
http://www.microsoft.com/en-us/download/details.aspx?id=8442
- error C2065: '_Hash_compare' : undeclared identifier
- error C2065: '_beginthread' : undeclared identifier
- error C2065: 'IDD_SHOWINFODLG' : undeclared identifier
- error C2065: 'CComVariant' : undeclared identifier
- error C2065: 'CArchiveStream' : undeclared identifier
- error C2065: 'getCmdBuf1' : undeclared identifier
- error C2065: 'DEBUG_NEW' : undeclared identifier?
- error C2065: 'NULL' : undeclared identifier
- error C2065: 'pcap_findalldevs_ex' : undeclared identifier
- error C2065: 'WM_SETMESSAGESTRING' : undeclared identifier
- error C2065: 'DirectInputCreate' : undeclared identifier
- error C2065: 'AfxEnableControlContainer' : undeclared identifier
- error C2065: 'i' : undeclared identifier
- error C2065: 'ULONG_PTR' : undeclared identifier
- error C2065: 'IMAGE_SIZEOF_BASE_RELOCATION' : undeclared identifier
- error C2065: 'DEBUG_NEW' : undeclared identifier?
- error C2065: 'printf' : undeclared identifier
- error C2065: 'nocreate' : undeclared identifier
- JAVA GC原理
- Jrebel 体验
- IOCP原理
- 黑马程序员——IO输入与输出(二)
- Opencv画图函数整理 及 cvCircle cvLine 只能画出黑白两种颜色问题 解决
- error C2065: '_Hash_compare' : undeclared identifier
- C++ 虚函数表解析
- tomcat 部署项目时报错--(1)
- 大公司体制内创新的困境
- 最长的前缀
- C# Attribute
- verilog错误及解决方法
- PB5.0: EMULATOR X86 失败
- 一件被误导很久的事:关于new和delete