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版也编译通过!
#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
- error C2039: \'NotifyWinEvent\' : is not a member of \'`global namespace\'\'
- error C2039: 'memchr' : is not a member of '`global namespace''
- is not a member of global namespace
- error C2039: 'foreground_regions' : is not a member of 'CvGaussBGModel'
- C2039 Error: WriteHuge : is not a member of CFile
- error C2039: 'SetPoint' : is not a member of 'CPoint'
- error C2039: 'addCameraManipulator' : is not a member of 'osgGA
- error C2039: 'serial_port' : is not a member of 'boost::asio'
- error C2039: 'wstring' : is not a member of 'std'(转)
- error C2039: ‘ReadHuge’ : is not a member of ‘CFile
- error C2039: 'm_dwVersion' : is not a member of 'AFX_MODULE_STATE'
- error C2039: 'bitset' : is not a member of 'std'
- error C2039: 'GetCurSel' : is not a member of 'CString'
- error C2039: 'min' : is not a member of 'std'
- error C2039: 'Release' : is not a member of 'IFile'
- 'XXXXXXXX' : is not a member of '`global namespace''
- wtl7.1+atl3.0 error C2039: '_U_STRINGorID' : is not a member of 'WTL'
- shared_ptr.hpp(321) : error C2039: 'type_info' : is not a member of 'std' 错误修正
- /etc/sysconfig/network: No such file or directory
- undefined reference to `SSL_get_current_cipher\' 链接OpenSSL库 -lssl
- svn 不显示图标状态
- Deep Learning(深度学习)学习笔记整理系列之(四)
- [转] std::_Copy_impl
- error C2039: \'NotifyWinEvent\' : is not a member of \'`global namespace\'\'
- [转]Centos 网络配置(手动设置和自动获取)IP的方法
- vi vim 查找和替换字符串 命令
- [转]MySQL修改root密码的多种方法
- [转]The Adobe Flash plugin has crashed
- Unfortunately,Launcher has stopped
- [转] CentOS 6.5系统安装配置LAMP(Apache+PHP5+MySQL)服务器环境
- <The Art of Readable Code> 笔记二 (上)
- [转]iOS8详细规范