vc6.0代码转vs2017相关问题
vc6.0代码转vs2017相关问题
命令行 error D8016: “/ZI”和“/Gy-”命令行选项不兼容
fatal error C1083: 无法打开包括文件: “WinSock2.h”: No such file or directory
(打开项目属性-配置属性-常规-平台工具集-‘Visual Studio 2010(v100)那一项’-重新编译)
D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include
vs2010目录
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include
dir.h放入的目录
#if !defined(__IOSTREAM_H)
//#include <iostream.h> //txwtech
#include <iostream>
#endif
fatal error C1083: 无法打开包括文件:“iostream.h”: No such file or directory
error C2238: 意外的标记位于“;”之前
vs2008
D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include
error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int. setItemBgColor(COLORREF itembg);前添加void
CSkin.h(31): error C2383: “_SetListHeaderSortInfo”: 此符号中不允许有默认参数
typedef (*_LoadSkin) (LPCTSTR skinName,bool bLoadFromIniFile=false);
vc版本:
typedef BOOL (WINAPI * ADD_ACL_QUERY)(TCHAR* sPathName, BOOL EnableComboApplication=FALSE);
升级到vs版本后为:
typedef BOOL (WINAPI * ADD_ACL_QUERY)(TCHAR* sPathName, BOOL EnableComboApplication );
将FALSE去掉不然会出现上述错误
///
error C2668: “pow”: 对重载函数的调用不明确
//if(m_deltaTime<(pow(10,-5))||m_deltaTime<0) //pow(10,-5)10的-5次方
if (m_deltaTime < (pow(10.0, -5)) || m_deltaTime < 0) //pow(10,-5)10的-5次方 txwtech
错误原因:
VS2010中,数学函数的参数检查更为严格
关于pow()有“long double pow(long double,int)”或“float pow(float,int)”或“double pow(double,int)”
解决方法:
明确使用哪种数据类型
比如使用:pow((double)x,y)即明确使用double pow(double,int)
1>DataStatistics.cpp(58): error C2440: “static_cast”: 无法从“void (__thiscall CDataStatistics::* )(CMenu *,UINT,bool)”转换为“void (__thiscall CWnd::* )(CMenu *,UINT,BOOL)”
bool改成BOOL
void CDataStatistics::OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu)//vs2017
//void CDataStatistics::OnInitMenuPopup(CMenu *pPopupMenu,UINT nIndex,bool bSysmenu)//vc6.0
1>InitDeviceDlg.cpp(40): error C2440: “static_cast”: 无法从“int (__thiscall CInitDeviceDlg::* )(void)”转换为“AFX_PMSG”
在匹配目标类型的范围内没有具有该名称的函数
VC 禁止显示状态 错误 2440 “static_cast”: 无法从“BOOL (__thiscall CMainFrame::* )(void)”转换为“AFX_PMSG
2016/8/4 9:55:25 来源:apple 阅读:1718
VC 禁止显示状态 错误C2440“static_cast”: 无法从“BOOL (__thiscall CMainFrame::* )(void)”转换为“AFX_PMSG
关于上面的这个错误,查询了很多资料,最后与前面的问题做了比较,得到另一个帖子的一些启发,如下内容:
"
回复者:我也遇到过同样的问题,将int改为void,然后将原函数中的return 0;这句话删掉。一切就OK了。
追问:
我的返回值是有用的的不是返回一个,是好几个。
追答:
这是个矛盾体,
回复者:那样就冲突了,既是消息映射,又要有返回值。这个是冲突的。
"
AFX_PMSG类型:
void (AFX_MSG_CALL CCmdTarget::* )(void)
发生错误的源代码:
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
//{{AFX_MSG_MAP(CMainFrame)
ON_COMMAND(IDM_PATIENT_VIEWREPORT, OnPatientViewReport)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
关于我的理解,既然是消息映射,那就用前面的办法吧!
使用“ON_MESSAGE(IDM_PATIENT_VIEWREPORT, OnPatientViewReport)//VC6->VS2015, 2016.8.4 by sms,将上面语句进行修正”,来代替“ON_COMMAND(IDM_PATIENT_VIEWREPORT, OnPatientViewReport)”,
同时还要参考前一篇文章的方法进行修改就行了。
OK Rebuild,通过~
1>WListBox.cpp(61): error C2556: “int CWListBox::SetTextColor(COLORREF)”: 重载函数与“void CWListBox::SetTextColor(COLORREF)”只是在返回类型上不同
//CWListBox::SetTextColor(COLORREF color) //txwtech
void CWListBox::SetTextColor(COLORREF color)
1>d:\program files (x86)\microsoft visual studio\vc98\include\utility(82): warning C4346: “iterator_category”: 依赖名称不是类型
1>d:\program files (x86)\microsoft visual studio\vc98\include\utility(82): note: 用“typename”为前缀来表示类型
1>d:\program files (x86)\microsoft visual studio\vc98\include\utility(86): note: 参见对正在编译的 类 模板 实例化 "std::iterator_traits<_It>" 的引用
1>d:\program files (x86)\microsoft visual studio\vc98\include\utility(82): error C2061: 语法错误: 标识符“iterator_category”
1>d:\program files (x86)\microsoft visual studio\vc98\include\utility(82): error C2238: 意外的标记位于“;”之前
解决方法:
typedef typename _It::iterator_category iterator_category; //txwtech,_It前加一个typename
vc6.0转vs2010之后的编译环境:
找到项目-属性-》VC++目录,包含目录:添加以下三个路径。
D:\Program Files (x86)\Microsoft Visual Studio\VC98\Include
D:\Program Files (x86)\Microsoft Visual Studio\VC98\ATL\Include
D:\Program Files (x86)\Microsoft Visual Studio\VC98\MFC\Include
引用目录:
D:\Program Files (x86)\Microsoft Visual Studio\VC98\Lib
D:\Program Files (x86)\Microsoft Visual Studio\VC98\MFC\Lib
库目录:
D:\Program Files (x86)\Microsoft Visual Studio\VC98\Lib
D:\Program Files (x86)\Microsoft Visual Studio\VC98\MFC\Lib
否则报以下错误。
1>------ 已启动生成: 项目: SMW200, 配置: Debug Win32 ------
1>StdAfx.cpp
1> WINVER not defined. Defaulting to 0x0600 (Windows Vista)
1>
1>NOTE: WINVER has been defined as 0x0500 or greater which enables
1>Windows NT 5.0 and Windows 98 features. When these headers were released,
1>Windows NT 5.0 beta 1 and Windows 98 beta 2.1 were the current versions.
1>
1>For this release when WINVER is defined as 0x0500 or greater, you can only
1>build beta or test applications. To build a retail application,
1>set WINVER to 0x0400 or visit http://www.microsoft.com/msdn/sdk
1>to see if retail Windows NT 5.0 or Windows 98 headers are available.
1>
1>See the SDK release notes for more information.
1>
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\afxv_w32.h(233): error C2065: “DWORD_PTR”: 未声明的标识符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\afxv_w32.h(233): error C2143: 语法错误 : 缺少“;”(在“GetWindowThreadProcessId”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atlconv.h(92): error C2061: 语法错误 : 标识符“LONG_PTR”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atlconv.h(92): error C2146: 语法错误 : 缺少“(”(在标识符“LONG_PTR”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atlconv.h(92): error C2061: 语法错误 : 标识符“LONG_PTR”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atlconv.h(92): error C2146: 语法错误 : 缺少“(”(在标识符“LONG_PTR”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(31): error C2143: 语法错误 : 缺少“;”(在“__stdcall”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(31): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(31): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(32): error C2146: 语法错误 : 缺少“)”(在标识符“dwProcess”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(32): warning C4229: 使用了记时错误 : 忽略数据上的修饰符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(32): error C2182: “AtlTraceCloseProcess”: 非法使用“void”类型
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(32): error C2059: 语法错误 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(33): error C2146: 语法错误 : 缺少“)”(在标识符“dwProcess”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(33): warning C4229: 使用了记时错误 : 忽略数据上的修饰符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(33): error C2182: “AtlTraceSnapshotProcess”: 非法使用“void”类型
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(33): error C2059: 语法错误 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(35): error C2143: 语法错误 : 缺少“;”(在“__stdcall”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(35): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(35): error C2086: “int ATL::DWORD_PTR”: 重定义
1> D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(31) : 参见“ATL::DWORD_PTR”的声明
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(36): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(37): error C2146: 语法错误 : 缺少“)”(在标识符“dwModule”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(37): warning C4229: 使用了记时错误 : 忽略数据上的修饰符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(37): error C2059: 语法错误 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(39): error C2143: 语法错误 : 缺少“;”(在“__stdcall”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(39): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(39): error C2086: “int ATL::DWORD_PTR”: 重定义
1> D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(31) : 参见“ATL::DWORD_PTR”的声明
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(39): error C2146: 语法错误 : 缺少“)”(在标识符“dwModule”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(39): warning C4229: 使用了记时错误 : 忽略数据上的修饰符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(39): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(39): error C2059: 语法错误 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(40): error C2143: 语法错误 : 缺少“;”(在“__stdcall”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(40): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(40): error C2086: “int ATL::DWORD_PTR”: 重定义
1> D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(31) : 参见“ATL::DWORD_PTR”的声明
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(40): error C2146: 语法错误 : 缺少“)”(在标识符“dwModule”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(40): warning C4229: 使用了记时错误 : 忽略数据上的修饰符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(40): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(40): error C2059: 语法错误 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(42): error C2146: 语法错误 : 缺少“)”(在标识符“dwProcess”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(42): warning C4229: 使用了记时错误 : 忽略数据上的修饰符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(42): error C2059: 语法错误 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(43): error C2146: 语法错误 : 缺少“)”(在标识符“dwProcess”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(43): warning C4229: 使用了记时错误 : 忽略数据上的修饰符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(43): error C2059: 语法错误 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(44): error C2146: 语法错误 : 缺少“)”(在标识符“dwProcess”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(44): warning C4229: 使用了记时错误 : 忽略数据上的修饰符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(44): error C2059: 语法错误 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(45): error C2146: 语法错误 : 缺少“)”(在标识符“dwProcess”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(45): warning C4229: 使用了记时错误 : 忽略数据上的修饰符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(45): error C2059: 语法错误 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(46): error C2146: 语法错误 : 缺少“)”(在标识符“dwProcess”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(46): warning C4229: 使用了记时错误 : 忽略数据上的修饰符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(46): error C2059: 语法错误 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(47): error C2146: 语法错误 : 缺少“)”(在标识符“dwProcess”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(47): warning C4229: 使用了记时错误 : 忽略数据上的修饰符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(47): error C2059: 语法错误 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(57): error C2146: 语法错误 : 缺少“)”(在标识符“dwModule”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(57): warning C4229: 使用了记时错误 : 忽略数据上的修饰符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(57): error C2182: “AtlTraceVA”: 非法使用“void”类型
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(58): error C2059: 语法错误 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(59): error C2146: 语法错误 : 缺少“)”(在标识符“dwModule”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(59): warning C4229: 使用了记时错误 : 忽略数据上的修饰符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(59): error C2182: “AtlTraceVU”: 非法使用“void”类型
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(60): error C2059: 语法错误 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(62): error C2061: 语法错误 : 标识符“DWORD_PTR”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(63): error C2061: 语法错误 : 标识符“DWORD_PTR”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(64): error C2061: 语法错误 : 标识符“DWORD_PTR”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(65): error C2061: 语法错误 : 标识符“DWORD_PTR”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(91): error C2146: 语法错误 : 缺少“;”(在标识符“dwModule”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(91): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(91): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(99): error C2146: 语法错误 : 缺少“;”(在标识符“dwCategory”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(99): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(99): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(102): error C2146: 语法错误 : 缺少“)”(在标识符“dwProcess”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(102): warning C4229: 使用了记时错误 : 忽略数据上的修饰符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(102): error C2059: 语法错误 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(103): error C2146: 语法错误 : 缺少“)”(在标识符“dwProcess”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(103): warning C4229: 使用了记时错误 : 忽略数据上的修饰符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(103): error C2182: “AtlTraceGetModuleInfo”: 非法使用“void”类型
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(103): error C2059: 语法错误 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(104): error C2146: 语法错误 : 缺少“)”(在标识符“dwProcess”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(104): warning C4229: 使用了记时错误 : 忽略数据上的修饰符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(104): error C2182: “AtlTraceGetCategoryInfo”: 非法使用“void”类型
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atldebugapi.h(104): error C2059: 语法错误 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(48): error C2833: “operator DWORD_PTR”不是可识别的运算符或类型
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(48): error C2059: 语法错误 : “newline”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(48): error C2238: 意外的标记位于“;”之前
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(52): error C2146: 语法错误 : 缺少“;”(在标识符“m_dwCategory”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(52): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(52): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(57): error C2146: 语法错误 : 缺少“)”(在标识符“dwModule”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(57): warning C4800: “int”: 将值强制为布尔值“true”或“false”(性能警告)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(57): error C2059: 语法错误 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(83): error C2061: 语法错误 : 标识符“DWORD_PTR”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(89): error C2061: 语法错误 : 标识符“DWORD_PTR”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(122): error C2061: 语法错误 : 标识符“DWORD_PTR”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(124): error C2061: 语法错误 : 标识符“DWORD_PTR”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(124): error C2535: “void ATL::CTrace::TraceV(const char *,int) const”: 已经定义或声明成员函数
1> D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(121) : 参见“ATL::CTrace::TraceV”的声明
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(126): error C2146: 语法错误 : 缺少“;”(在标识符“RegisterCategory”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(126): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(127): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(127): warning C4183: “RegisterCategory”: 缺少返回类型;假定为返回“int”的成员函数
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(138): error C2061: 语法错误 : 标识符“DWORD_PTR”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(145): error C2146: 语法错误 : 缺少“;”(在标识符“m_dwModule”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(145): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(145): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(73): error C2614: “ATL::CTrace”: 非法的成员初始化:“m_dwModule”不是基或成员
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(74): error C2065: “m_dwModule”: 未声明的标识符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(79): error C2065: “m_dwModule”: 未声明的标识符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(86): error C2065: “dwCategory”: 未声明的标识符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(86): error C2065: “nLevel”: 未声明的标识符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(86): error C2065: “eStatus”: 未声明的标识符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(91): error C2065: “pnLevel”: 未声明的标识符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(91): error C2065: “peStatus”: 未声明的标识符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(92): error C2065: “dwCategory”: 未声明的标识符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(92): error C2065: “pnLevel”: 未声明的标识符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(92): error C2065: “peStatus”: 未声明的标识符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(98): error C2065: “m_dwModule”: 未声明的标识符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(104): error C2065: “m_dwModule”: 未声明的标识符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(110): error C2065: “m_dwModule”: 未声明的标识符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(118): error C2065: “m_dwModule”: 未声明的标识符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(119): error C2065: “m_dwModule”: 未声明的标识符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(127): error C2065: “m_dwModule”: 未声明的标识符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(139): error C2039: “m_dwModule”: 不是“ATL::CTrace”的成员
1> D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(60) : 参见“ATL::CTrace”的声明
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(139): error C2065: “dwCategory”: 未声明的标识符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(139): error C2065: “nLevel”: 未声明的标识符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(148): error C2146: 语法错误 : 缺少“)”(在标识符“dwCategory”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(148): error C2433: “IsTracingEnabled”: 不允许在数据声明中使用“inline”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(148): warning C4800: “int”: 将值强制为布尔值“true”或“false”(性能警告)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(148): error C2059: 语法错误 : “)”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(149): error C2143: 语法错误 : 缺少“;”(在“{”的前面)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(149): error C2447: “{”: 缺少函数标题(是否是老式的形式表?)
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(154): error C2061: 语法错误 : 标识符“DWORD_PTR”
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(156): error C2065: “dwCategory”: 未声明的标识符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(156): error C2065: “nLevel”: 未声明的标识符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(156): error C2065: “pszFmt”: 未声明的标识符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(156): error C2065: “args”: 未声明的标识符
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atltrace.h(156): fatal error C1003: 错误计数超过 100;正在停止编译
1>已完成生成项目“SMW200.vcxproj”的操作 - 失败。
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========
error C4578: “abs”: 从“float”到“int”的转换,可能丢失数据(你的意思是调用“fabsf”或进行 #include <cmath>?)
// float abs_variable;
int abs_variable; //txwtech
1>d:\program files (x86)\microsoft visual studio\vc98\include\utility(226): warning C4348: “std::istreambuf_iterator”: 重定义默认参数 : 参数 2
1>d:\program files (x86)\microsoft visual studio\vc98\include\utility(228): note: 参见“std::istreambuf_iterator”的声明
1>d:\program files (x86)\microsoft visual studio\vc98\include\utility(228): warning C4346: “_Tr::off_type”: 依赖名称不是类型
1>d:\program files (x86)\microsoft visual studio\vc98\include\utility(228): note: 用“typename”为前缀来表示类型
error C2923: “std::iterator”: 对于参数“_D”,“_Tr::off_type”不是有效的 模板 类型变量
error C2664: “char *strcpy(char *,const char *)”: 无法将参数 1 从“WCHAR [32]”转换为“char *”
//strcpy(m_lf.lfFaceName, strFont);
//_tcscpy(m_lf.lfFaceName, strFont);
wcscpy_s(m_lf.lfFaceName, strFont);
https://blog.csdn.net/u014628654/article/details/45246721
//如下都是vs2017包含头文件名的顺序有关系。顺序不对,就一堆错误咯。
正确的顺序:
#include "pch.h"
#include "stdafx.h"
//#include "main.h"
#include "Lable.h"
vs2017, pch.h (previous compiled header).cpp都是需要包含在第一个位置的。
引用或者调用使用其他的现有的cpp时,pch.h (previous compiled header).cpp都是需要包含在第一个位置的
1>Lable.cpp
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(47): error C2653: “CLable”: 不是类或命名空间名称
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(48): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(49): error C2065: “m_crText”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(50): error C2065: “m_hBackBrush”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(51): error C2065: “m_lf”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(52): error C2065: “m_font”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(52): error C2065: “m_lf”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(53): error C2065: “m_bTimer”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(54): error C2065: “m_bState”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(55): error C2065: “m_bTransparent”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(56): error C2065: “m_bLink”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(57): error C2065: “m_hCursor”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(58): error C2065: “m_Type”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(58): error C2065: “None”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(59): error C2065: “m_bFont3d”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(60): error C2065: “m_bNotifyParent”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(61): error C2065: “m_bToolTips”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(62): error C2065: “m_bRotation”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(63): error C2065: “m_cr3DHiliteColor”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(64): error C2065: “m_hwndBrush”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(65): warning C4508: “CLable”: 函数应返回一个值;假定“void”返回类型
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(67): error C2653: “CLable”: 不是类或命名空间名称
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(67): error C2523: “<未知>::~CLable”: 析构函数 标记不匹配
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(68): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(68): error C2084: 函数“int CLable(void)”已有主体
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(47): note: 参见“CLable”的前一个定义
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(70): error C2065: “m_font”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(71): error C2065: “m_hwndBrush”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(72): error C2065: “m_hBackBrush”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(75): error C2653: “CLable”: 不是类或命名空间名称
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(75): error C2270: “GetMessageMap”: 非成员函数上不允许修饰符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(75): error C3861: “GetThisMessageMap”: 找不到标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(75): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(75): error C2146: 语法错误: 缺少“;”(在标识符“ThisClass”的前面)
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(75): error C2065: “ThisClass”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(77): error C2653: “ThisClass”: 不是类或命名空间名称
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(77): error C2065: “OnTimer”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(78): error C2653: “ThisClass”: 不是类或命名空间名称
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(78): error C2065: “OnLButtonDown”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(79): error C2653: “ThisClass”: 不是类或命名空间名称
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(79): error C2065: “OnSetCursor”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(80): error C2653: “ThisClass”: 不是类或命名空间名称
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(80): error C2065: “OnSysColorChange”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(81): error C2653: “ThisClass”: 不是类或命名空间名称
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(81): error C2065: “OnPaint”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(83): error C2248: “CWnd::GetThisMessageMap”: 无法访问 protected 成员(在“CWnd”类中声明)
1>d:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\atlmfc\include\afxwin.h(3254): note: 参见“CWnd::GetThisMessageMap”的声明
1>d:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\atlmfc\include\afxwin.h(2181): note: 参见“CWnd”的声明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(88): error C2653: “CLable”: 不是类或命名空间名称
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(90): error C2065: “m_font”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(91): error C2065: “m_font”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(91): error C2065: “m_lf”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(97): error C2653: “CLable”: 不是类或命名空间名称
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(99): error C2355: “this”: 只能在非静态成员函数或非静态数据成员初始值设定项的内部引用
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(99): error C2512: “CPaintDC::CPaintDC”: 没有合适的默认构造函数可用
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(104): error C2660: “GetClientRect”: 函数不接受 1 个参数
1>d:\windows kits\10\include\10.0.17763.0\um\winuser.h(8799): note: 参见“GetClientRect”的声明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(106): error C2660: “GetWindowTextW”: 函数不接受 1 个参数
1>d:\windows kits\10\include\10.0.17763.0\um\winuser.h(8770): note: 参见“GetWindowTextW”的声明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(112): error C2065: “m_bTransparent”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(126): error C2065: “m_crText”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(127): error C2065: “m_font”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(130): error C2065: “m_bTransparent”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(134): error C2065: “m_bState”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(134): error C2065: “m_Type”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(134): error C2065: “Background”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(136): error C2065: “m_hBackBrush”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(137): error C2065: “m_hBackBrush”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(139): error C2065: “m_hwndBrush”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(143): error C2065: “m_hBackBrush”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(144): error C2065: “m_hBackBrush”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(146): error C2065: “m_hwndBrush”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(158): error C2065: “m_hBackBrush”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(161): error C2065: “m_bState”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(161): error C2065: “m_Type”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(161): error C2065: “Text”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(165): error C3861: “GetStyle”: 找不到标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(168): error C3861: “GetStyle”: 找不到标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(171): error C3861: “GetStyle”: 找不到标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(174): error C3861: “GetStyle”: 找不到标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(179): error C3861: “GetStyle”: 找不到标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(193): error C2065: “m_bRotation”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(207): error C2065: “m_bFont3d”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(209): error C2065: “m_cr3DHiliteColor”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(211): error C2065: “m_3dType”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(211): error C2065: “Raised”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(225): error C2065: “m_bTransparent”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(232): error C2653: “CLable”: 不是类或命名空间名称
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(234): error C2065: “m_bState”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(236): error C2660: “InvalidateRect”: 函数不接受 2 个参数
1>d:\windows kits\10\include\10.0.17763.0\um\winuser.h(8451): note: 参见“InvalidateRect”的声明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(237): error C2660: “UpdateWindow”: 函数不接受 0 个参数
1>d:\windows kits\10\include\10.0.17763.0\um\winuser.h(8264): note: 参见“UpdateWindow”的声明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(239): error C2248: “CWnd::OnTimer”: 无法访问 protected 成员(在“CWnd”类中声明)
1>d:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\atlmfc\include\afxwin.h(2848): note: 参见“CWnd::OnTimer”的声明
1>d:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\atlmfc\include\afxwin.h(2181): note: 参见“CWnd”的声明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(239): error C2352: “CWnd::OnTimer”: 非静态成员函数的非法调用
1>d:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\atlmfc\include\afxwin.h(2848): note: 参见“CWnd::OnTimer”的声明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(242): error C2653: “CLable”: 不是类或命名空间名称
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(244): error C2065: “m_hCursor”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(246): error C2065: “m_hCursor”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(249): error C2248: “CWnd::OnSetCursor”: 无法访问 protected 成员(在“CWnd”类中声明)
1>d:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\atlmfc\include\afxwin.h(2847): note: 参见“CWnd::OnSetCursor”的声明
1>d:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\atlmfc\include\afxwin.h(2181): note: 参见“CWnd”的声明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(249): error C2352: “CWnd::OnSetCursor”: 非静态成员函数的非法调用
1>d:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\atlmfc\include\afxwin.h(2847): note: 参见“CWnd::OnSetCursor”的声明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(252): error C2653: “CLable”: 不是类或命名空间名称
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(254): error C2065: “m_bNotifyParent”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(257): error C2660: “GetWindowTextW”: 函数不接受 1 个参数
1>d:\windows kits\10\include\10.0.17763.0\um\winuser.h(8770): note: 参见“GetWindowTextW”的声明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(266): error C3861: “GetSafeHwnd”: 找不到标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(267): error C2660: “GetDlgCtrlID”: 函数不接受 0 个参数
1>d:\windows kits\10\include\10.0.17763.0\um\winuser.h(5137): note: 参见“GetDlgCtrlID”的声明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(268): error C2065: “NM_LINKCLICK”: 未声明的标识符
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(269): error C2660: “GetParent”: 函数不接受 0 个参数
1>d:\windows kits\10\include\10.0.17763.0\um\winuser.h(9800): note: 参见“GetParent”的声明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(272): error C2248: “CWnd::OnLButtonDown”: 无法访问 protected 成员(在“CWnd”类中声明)
1>d:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\atlmfc\include\afxwin.h(2830): note: 参见“CWnd::OnLButtonDown”的声明
1>d:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\atlmfc\include\afxwin.h(2181): note: 参见“CWnd”的声明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(272): error C2352: “CWnd::OnLButtonDown”: 非静态成员函数的非法调用
1>d:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\atlmfc\include\afxwin.h(2830): note: 参见“CWnd::OnLButtonDown”的声明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(275): error C2143: 语法错误: 缺少“;”(在“&”的前面)
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(275): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(275): error C2365: “CLable”: 重定义;以前的定义是“函数”
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(67): note: 参见“CLable”的声明
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(275): error C2653: “CLable”: 不是类或命名空间名称
1>d:\users\txwtech\projects\txw888\txw888\lable.cpp(275): fatal error C1003: 错误计数超过 100;正在停止编译
1>已完成生成项目“TXW888.vcxproj”的操作 - 失败。
vc6.0代码转vs2017相关问题的更多相关文章
- VC6.0代码移植到VS2008运行时乱码问题解决
转载:http://blog.sina.com.cn/s/blog_6d0cbb030101a3cs.html 问题描述: 之前用VC6.0写过一个OpenGL的程序,后来需要将其放到VS20 ...
- VC6.0装了visual assist x回车键不能补全代码的解决方法
问题:VC6.0装了visual assist x补全代码具体怎么用? 输入字母后会像输入法那样出现一个菜单 但是怎么选择菜单里面的内容呢? 什么 回车 ...
- VC6.0 显示代码行号和WndTab插件
VC6.0是一款比较稳定的功能强大的IDE,目前也有很多人在使用.但美中不足的是它不能像其他IDE那样显示行号. 这里需要用到一个插件VC6LineNumberAddin,下载地址:http://fi ...
- VC6.0 如何显示代码行号
VC6.0是一款比较经典.稳定的功能强大的IDE,目前也有很多人在使用.但美中不足的是它不能像其他IDE那样显示行号.这里需要用到一个插件VC6LineNumberAddin, 下载地址:http:/ ...
- [MFC] VS2013版本MFC工程移植到VC6.0上
:VS虽号称“宇宙最强IDE”,但是有时候安装包太大,动不动就几个G:而且安装好之后也会多出很多几乎很难用到的部分,这对于那些处女座的人如何忍受!本文不是吐槽,而是给出一种在应急场景下,不用安装新版本 ...
- [OpenGL] 2、企业版VC6.0自带的Win32-OpenGL工程浅析
一. 建立工程 O(∩_∩)O~上一节介绍了一种非常容易的OpenGL的搭建方法,这一节将就上一节介绍的VC6.0企业版自带的OpenGL Win32 Application建立一个模板工程,并分析这 ...
- 在VC6.0中能不能使用Duilib界面库呢?
Duilib库的源代码是在vs2010下编译的,一般适用于vs2008及以上的版本开发使用,那么duilib能不能在vc6.0的工程中使用呢?如何在vc6.0中使用duilib库呢? 今天,由于工作要 ...
- 转载VC6.0 子窗口和父窗口
这个是我周一在一家公司做的上机题中的一道,当场没做出来.我当时只跟考官说了设计思路,是带回来查了几本资料书之后才完成的.因为有半个学期没用VC开发了……,最近一直都在实践ASP.NET相关的…… 建立 ...
- VC6.0开发OCX按钮控件
原文:http://www.cnblogs.com/joinclear/archive/2013/05/21/3091934.html 0前言 1.OCX是典型的ActiveX控件,常见的OCX控件有 ...
随机推荐
- 【转发】基本adbui命令使用 可做图像识别
原文请参考,很详细:hao1032/adbui 非常详细,感谢整理!!首先了解下 adb命令大全,adb最全的命令
- 剑指offer——数据结构
技术面重点:数组.字符串.链表.树.栈以及队列.
- [JavaWeb基础] 020.Velocity 模板引擎简单示例
1.什么是Velocity 一种J2EE的前端模版技术,和JSP,Freemarker差不多,都是用来展示网页内容的.和JSP不同的是velocity只能显示Action中的数据,不能处理数据.不能写 ...
- Mysql基础(二)
多表连接 #多表查询 /* sql99标准 等值连接 ①多表等值连接的结果为多表的交集部分 ② n个连接至少需要 n-1个连接 ③一般需要为表起别名 ④可以搭配前面介绍的所有子句的使用,比如排序,分组 ...
- 【转】sql用逗号连接多张表对应哪个join?
逗号连接查询(用where连接条件): select order.id, order.orderdate,employee.id,employee.name from order,employee w ...
- 设计一个多功能的MyTime类 代码参考
#include <iostream> #include <cstdio> using namespace std; class MyTime { private: int h ...
- 报错:The server cannot be started because one or more of the ports are invalid. Open the server editor and correct the invalid ports.
今天重装eclipse和Tomcat,启动时候报标题错“The server cannot be started because one or more of the ports are invali ...
- [03]HTML基础之行内标签
1.<ruby>标签 显示东亚字符的发音(如中文,日文等),与<rp>,<rt>标签搭配. //<ruby>为单个发音字符的容器,<rp>为 ...
- 深入理解JS:var、let、const的异同
目录 序言 var 与 let 的区别 作用域 重复声明 绑定全局对象 变量提升与暂存死区 let 与 const 异同 参考 1.序言 var.let 和 const 都是 JavaScript 中 ...
- LeetCode 74,直击BAT经典面试题
本文始发于个人公众号:TechFlow,原创不易,求个关注 今天是LeetCode专题43篇文章,我们今天来看一下LeetCode当中的74题,搜索二维矩阵,search 2D Matrix. 这题的 ...