VS2010 MFC程序编译报错,感觉很离奇
用VS2010新建了一个MFC Application 新建导向全是默认的(除了选成了单文档之外) 然后Build就报了这么一大串错误,感觉有些头文件都编译不过去,有哪位达人能解答一下吗?------ Build started: Project: MFCTest, Configuration: Debug Win32 ------
1> stdafx.cpp
1>d:\program files (x86)\microsoft visual studio 10.0\vc\include\afxwin.h(137): error C2011: 'CSize' : 'class' type redefinition
1> d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\atltypes.h(26) : see declaration of 'CSize'
1>d:\program files (x86)\microsoft visual studio 10.0\vc\include\afxwin.h(176): error C2011: 'CPoint' : 'class' type redefinition
1> d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\atltypes.h(69) : see declaration of 'CPoint'
1>d:\program files (x86)\microsoft visual studio 10.0\vc\include\afxwin.h(225): error C2011: 'CRect' : 'class' type redefinition
1> d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\atltypes.h(125) : see declaration of 'CRect'
1>d:\program files (x86)\microsoft visual studio 10.0\vc\include\afxwin.h(3195): error C2079: 'CFrameWnd::m_rectBorder' uses undefined class 'CRect'
1>d:\program files (x86)\microsoft visual studio 10.0\vc\include\afxwin.h(3741): error C2079: 'CScrollView::m_totalLog' uses undefined class 'CSize'
1>d:\program files (x86)\microsoft visual studio 10.0\vc\include\afxwin.h(3742): error C2079: 'CScrollView::m_totalDev' uses undefined class 'CSize'
1>d:\program files (x86)\microsoft visual studio 10.0\vc\include\afxwin.h(3743): error C2079: 'CScrollView::m_pageDev' uses undefined class 'CSize'
1>d:\program files (x86)\microsoft visual studio 10.0\vc\include\afxwin.h(3744): error C2079: 'CScrollView::m_lineDev' uses undefined class 'CSize'
1>d:\program files (x86)\microsoft visual studio 10.0\vc\include\afxwin.h(3870): error C2079: 'CWinThread::m_ptCursorLast' uses undefined class 'CPoint'
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(506): error C2061: syntax error : identifier 'FileDialogEvents'
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(507): error C2144: syntax error : 'int' should be preceded by ';'
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(507): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(507): warning C4183: 'BEGIN_INTERFACE_PART': missing return type; assumed to be a member function returning 'int'
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(507): error C2143: syntax error : missing ';' before '__stdcall'
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(507): error C2433: 'CFileDialog::HRESULT' : 'virtual' not permitted on data declarations
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(507): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(507): error C2495: 'CFileDialog::HRESULT' : '__declspec(nothrow)' can only be applied to function declarations or definitions
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(507): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(507): warning C4183: 'OnFileOk': missing return type; assumed to be a member function returning 'int'
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(515): error C2061: syntax error : identifier 'FileDialogEvents'
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(517): error C3646: 'BEGIN_INTERFACE_PART' : unknown override specifier
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(517): error C2061: syntax error : identifier 'FileDialogControlEvents'
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(518): error C2091: function returns function
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(518): error C2144: syntax error : 'int' should be preceded by ';'
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(518): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(518): warning C4183: 'END_INTERFACE_PART_OPTIONAL': missing return type; assumed to be a member function returning 'int'
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(518): error C2143: syntax error : missing ';' before '__stdcall'
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(518): error C2433: 'CFileDialog::HRESULT' : 'virtual' not permitted on data declarations
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(518): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(518): error C2495: 'CFileDialog::HRESULT' : '__declspec(nothrow)' can only be applied to function declarations or definitions
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(518): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(518): warning C4183: 'OnItemSelected': missing return type; assumed to be a member function returning 'int'
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(522): error C2061: syntax error : identifier 'FileDialogControlEvents'
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(534): error C2143: syntax error : missing ';' before 'private'
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(534): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(534): error C2556: 'int CFileDialog::END_INTERFACE_PART_OPTIONAL(void)' : overloaded function differs only by return type from 'int (__cdecl *CFileDialog::END_INTERFACE_PART_OPTIONAL(void))(void)'
1> d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(515) : see declaration of 'CFileDialog::END_INTERFACE_PART_OPTIONAL'
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(534): error C2040: 'CFileDialog::END_INTERFACE_PART_OPTIONAL' : 'int (void)' differs in levels of indirection from 'int (__cdecl *(void))(void)'
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxdlgs.h(534): warning C4183: 'END_INTERFACE_PART_OPTIONAL': missing return type; assumed to be a member function returning 'int'
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxext.h(432): error C2079: 'CToolBar::m_sizeImage' uses undefined class 'CSize'
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxext.h(433): error C2079: 'CToolBar::m_sizeButton' uses undefined class 'CSize'
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxext.h(375): error C3861: 'CRect': identifier not found
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxext.h(375): error C2440: 'default argument' : cannot convert from 'CRect' to 'CRect'
1> Source or target has incomplete type
1>d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxext.h(463): fatal error C1903: unable to recover from previous error(s); stopping compilation
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========