VC7/8的工程移至VC6时碰到的warning C4005: '_WIN32_WINDOWS' : macro redefinition及其解决

本文介绍了解决从高版本VC(如2005/2003)迁移到VC6时遇到的warning C4005('_WIN32_WINDOWS': macro redefinition)的方法。解决方案为使用VC6生成的stdafx.h文件替换高版本VC中的同名文件。
将高版本VC(2005/2003)的工程移至VC6下时,经常碰到:
warning C4005: '_WIN32_WINDOWS' : macro redefinition

解决方法:
以VC6生成的stdafx.h替代高版本VC的同名文件。
'void __thiscall CMap1View::OnRGBSplit(void)' : overloaded function differs only by return type from 'int __thiscall CMap1View::OnRGBSplit(void)' d:\vc6.0\microsoft visual studio\myprojects\map1\map1view.h(22) : see declaration of 'OnRGBSplit' D:\VC6.0\Microsoft Visual Studio\MyProjects\map1\map1View.cpp(110) : error C2371: 'OnRGBSplit' : redefinition; different basic types d:\vc6.0\microsoft visual studio\myprojects\map1\map1view.h(22) : see declaration of 'OnRGBSplit' D:\VC6.0\Microsoft Visual Studio\MyProjects\map1\map1View.cpp(111) : error C2065: 'm_image' : undeclared identifier D:\VC6.0\Microsoft Visual Studio\MyProjects\map1\map1View.cpp(111) : error C2228: left of '.empty' must have class/struct/union type D:\VC6.0\Microsoft Visual Studio\MyProjects\map1\map1View.cpp(112) : error C2143: syntax error : missing ')' before '{' D:\VC6.0\Microsoft Visual Studio\MyProjects\map1\map1View.cpp(118) : error C2065: 'vector' : undeclared identifier D:\VC6.0\Microsoft Visual Studio\MyProjects\map1\map1View.cpp(118) : error C2065: 'Mat' : undeclared identifier D:\VC6.0\Microsoft Visual Studio\MyProjects\map1\map1View.cpp(118) : error C2065: 'channels' : undeclared identifier D:\VC6.0\Microsoft Visual Studio\MyProjects\map1\map1View.cpp(118) : warning C4804: '>' : unsafe use of type 'bool' in operation D:\VC6.0\Microsoft Visual Studio\MyProjects\map1\map1View.cpp(118) : warning C4552: '>' : operator has no effect; expected operator with side-effect D:\VC6.0\Microsoft Visual Studio\MyProjects\map1\map1View.cpp(119) : error C2065: 'split' : undeclared identifier D:\VC6.0\Microsoft Visual Studio\MyProjects\map1\map1View.cpp(121) : error C2001: newline in constant D:\VC6.0\Microsoft Visual Studio\MyProjects\map1\map1View.cpp(121) : fatal error C1057: unexpected end of file in macro expansion
最新发布
10-15
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值