error C2039: \'NotifyWinEvent\' : is not a member of \'`global namespace\'\'

来源:互联网 发布:yum lock如何解锁 编辑:程序博客网 时间:2024/05/16 09:05
今天一个老的VC项目,在Win8和VS2008上编译,之前是debug版编不过,网上查了会问题,然后再看到代码文件stdafx.h中有如下宏定义:

#ifndef WINVER                      // 允许使用 Windows 95 和 Windows NT 4 或更高版本的特定功能。
#define WINVER 0x0400        //为 Windows98 和 Windows 2000 及更新版本改变为适当的值。
#endif

#ifndef _WIN32_WINNT                     // 允许使用 Windows NT 4 或更高版本的特定功能。
#define _WIN32_WINNT 0x0400        //为 Windows98 和 Windows 2000 及更新版本改变为适当的值。
#endif 
                      


#define _WIN32_WINNT 0x0400
改为
#define _WIN32_WINNT 0x0500
后debug版通过编译,但是release版还是编译不过,报错:
error C2039: 'NotifyWinEvent' : is not a member of '`global namespace''
error C2660: 'CWnd::NotifyWinEvent' : function does not take 4 arguments
然后将
#define WINVER 0x0400
改为
#define WINVER 0x0500
release版也编译通过!
0 0
原创粉丝点击