Error1error C1189: #error : MFC does not support WINVER less than 0x0501. Please change the defi

来源:互联网 发布:我做淘宝客怎么找商家 编辑:程序博客网 时间:2024/05/22 19:21

1、修改WINVER和_WIN32_WINNT

      Visual C++ 不再支持面向 Windows 95、Windows 98、Windows ME、Windows NT 或 Windows 2000。 如果你的 WINVER 或 _WIN32_WINNT 宏分配给了这些 Windows 版本中的一个,则必须修改宏。 升级使用早期版本的 Visual C++ 创建的项目时,你可能会看到与 WINVER 或 _WIN32_WINNT 宏相关的编译错误(如果这些宏分配给了不再受支持的 Windows 版本)。



备注:

     若要修改宏,请在stdafx.h头文件中添加以下行。

#define WINVER 0x0602#define _WIN32_WINNT 0x0602

       此版本面向 Windows 8 操作系统。 其他有效值包括适用于 Windows XP 的 0x0501、适用于 Windows Server 2003 的 0x0502、适用于 Windows Vista 的 0x0600、适用于 Windows 7 的 0x0601、适用于 Windows 8 的 0x602,以及适用于 Windows 8.1 的 0x603。

0 0
原创粉丝点击