【发布时间】:2011-10-13 09:59:25
【问题描述】:
我正在使用 DirectX 9 On Vs 2008/windows7 做示例。 我遇到了错误。
1>----- 构建开始:项目:VideoCapture,配置:调试 Unicode Win32 ------ 1>正在编译...
1>VideoCaptureDlg.cpp
1>.\VideoCaptureDlg.cpp(169):错误 C2065:“SHGFP_TYPE_CURRENT”:未声明的标识符
1>.\VideoCaptureDlg.cpp(169) : 错误 C3861: 'SHGetFolderPath': 找不到标识符
1>.\VideoCaptureDlg.cpp(173):错误 C2065:“SHGFP_TYPE_CURRENT”:未声明的标识符
1>.\VideoCaptureDlg.cpp(173):错误 C3861:“SHGetFolderPath”:找不到标识符
1>.\VideoCaptureDlg.cpp(1025) : 警告 C4244: 'argument' : 从 'int' 转换为 'WORD',可能丢失数据
1>.\VideoCaptureDlg.cpp(1180):错误 C2065:“SHGFP_TYPE_CURRENT”:未声明的标识符
1>.\VideoCaptureDlg.cpp(1180) : 错误 C3861: 'SHGetFolderPath': 找不到标识符
1>.\VideoCaptureDlg.cpp(1184):错误 C2065:“SHGFP_TYPE_CURRENT”:未声明的标识符
1>.\VideoCaptureDlg.cpp(1184) : error C3861: 'SHGetFolderPath': identifier not found
我也添加了 shlobj.h 和 shell32.lib 仍然显示相同的错误。
我尝试在基于 Windows 7 和 Internet Explorer 8 的 stdafx.h 文件中更改以下宏的值,但它显示冲突“C1189:#error:_WIN32_WINNT 设置与_WIN32_IE 设置冲突”
// 不同平台对应值的最新信息请参考MSDN。
#ifndef WINVER // Allow use of features specific to Windows XP or later.
#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows.
#endif
#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.
#define _WIN32_WINNT 0x0601 // Change this to the appropriate value to target other versions of Windows.
#endif
#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
#endif
#ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later.
#define _WIN32_IE 0x0800 // Change this to the appropriate value to target other versions of IE.
#endif
对此问题的任何建议都会有所帮助。
【问题讨论】:
-
stdafx.h 是的,我在任何包含文件之前进行设置
-
移动评论以根据触发该错误的原因进行回答。