标题: 一个MFC的问题 [打印本页] 作者: W.Zhou 时间: 2004-11-27 21:12 标题: 一个MFC的问题 编译时老是出现这个错误:
Deleting intermediate files and output files for project 'Info - Win32 Debug'.
--------------------Configuration: Info - Win32 Debug--------------------
Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
Info.cpp
e:\project_info\info\information.h(7) : error C2535: 'struct CRuntimeClass *__stdcall CInfo::_GetBaseClass(void)' : member function already defined or declared
e:\project_info\info\information.h(6) : see declaration of '_GetBaseClass'
e:\project_info\info\information.h(7) : error C2373: 'classCInfo' : redefinition; different type modifiers
e:\project_info\info\information.h(6) : see declaration of 'classCInfo'
e:\project_info\info\information.h(7) : error C2535: 'struct CRuntimeClass *__thiscall CInfo::GetRuntimeClass(void) const' : member function already defined or declared
e:\project_info\info\information.h(6) : see declaration of 'GetRuntimeClass'
e:\project_info\info\information.h(7) : error C2535: 'class CObject *__stdcall CInfo::CreateObject(void)' : member function already defined or declared
e:\project_info\info\information.h(6) : see declaration of 'CreateObject'
InfoDoc.cpp
e:\project_info\info\information.h(7) : error C2535: 'struct CRuntimeClass *__stdcall CInfo::_GetBaseClass(void)' : member function already defined or declared
e:\project_info\info\information.h(6) : see declaration of '_GetBaseClass'
e:\project_info\info\information.h(7) : error C2373: 'classCInfo' : redefinition; different type modifiers
e:\project_info\info\information.h(6) : see declaration of 'classCInfo'
e:\project_info\info\information.h(7) : error C2535: 'struct CRuntimeClass *__thiscall CInfo::GetRuntimeClass(void) const' : member function already defined or declared
e:\project_info\info\information.h(6) : see declaration of 'GetRuntimeClass'
e:\project_info\info\information.h(7) : error C2535: 'class CObject *__stdcall CInfo::CreateObject(void)' : member function already defined or declared
e:\project_info\info\information.h(6) : see declaration of 'CreateObject'
E:\Project_Info\Info\InfoDoc.cpp(61) : error C2678: binary '<<' : no operator defined which takes a left-hand operand of type 'class CArchive' (or there is no acceptable conversion)
E:\Project_Info\Info\InfoDoc.cpp(65) : error C2679: binary '>;>;' : no operator defined which takes a right-hand operand of type 'class CObList' (or there is no acceptable conversion)
Information.cpp
e:\project_info\info\information.h(7) : error C2535: 'struct CRuntimeClass *__stdcall CInfo::_GetBaseClass(void)' : member function already defined or declared
e:\project_info\info\information.h(6) : see declaration of '_GetBaseClass'
e:\project_info\info\information.h(7) : error C2373: 'classCInfo' : redefinition; different type modifiers
e:\project_info\info\information.h(6) : see declaration of 'classCInfo'
e:\project_info\info\information.h(7) : error C2535: 'struct CRuntimeClass *__thiscall CInfo::GetRuntimeClass(void) const' : member function already defined or declared
e:\project_info\info\information.h(6) : see declaration of 'GetRuntimeClass'
e:\project_info\info\information.h(7) : error C2535: 'class CObject *__stdcall CInfo::CreateObject(void)' : member function already defined or declared
e:\project_info\info\information.h(6) : see declaration of 'CreateObject'
E:\Project_Info\Info\Information.cpp(4) : error C2512: 'CInfo' : no appropriate default constructor available
E:\Project_Info\Info\Information.cpp(5) : warning C4003: not enough actual parameters for macro 'IMPLEMENT_SERIAL'
E:\Project_Info\Info\Information.cpp(5) : warning C4003: not enough actual parameters for macro '_IMPLEMENT_RUNTIMECLASS'
E:\Project_Info\Info\Information.cpp(5) : error C2084: function 'class CObject *__stdcall CInfo::CreateObject(void)' already has a body
E:\Project_Info\Info\Information.cpp(5) : error C2512: 'CInfo' : no appropriate default constructor available
E:\Project_Info\Info\Information.cpp(5) : error C2084: function 'struct CRuntimeClass *__stdcall CInfo::_GetBaseClass(void)' already has a body
E:\Project_Info\Info\Information.cpp(5) : error C2373: 'public: static struct CRuntimeClass const CInfo::classCInfo' : redefinition; different type modifiers
e:\project_info\info\information.h(6) : see declaration of 'public: static struct CRuntimeClass const CInfo::classCInfo'
E:\Project_Info\Info\Information.cpp(5) : fatal error C1903: unable to recover from previous error(s); stopping compilation
InfoView.cpp
e:\project_info\info\information.h(7) : error C2535: 'struct CRuntimeClass *__stdcall CInfo::_GetBaseClass(void)' : member function already defined or declared
e:\project_info\info\information.h(6) : see declaration of '_GetBaseClass'
e:\project_info\info\information.h(7) : error C2373: 'classCInfo' : redefinition; different type modifiers
e:\project_info\info\information.h(6) : see declaration of 'classCInfo'
e:\project_info\info\information.h(7) : error C2535: 'struct CRuntimeClass *__thiscall CInfo::GetRuntimeClass(void) const' : member function already defined or declared
e:\project_info\info\information.h(6) : see declaration of 'GetRuntimeClass'
e:\project_info\info\information.h(7) : error C2535: 'class CObject *__stdcall CInfo::CreateObject(void)' : member function already defined or declared
e:\project_info\info\information.h(6) : see declaration of 'CreateObject'
MainFrm.cpp
Generating Code...
Error executing cl.exe.