Linking...
Employee.obj : error LNK2001: unresolved external symbol "public: virtual struct CRuntimeClass * __thiscall CEmployee::GetRuntimeClass(void)const " (?GetRuntimeClass@CEmployee@@UBEPAUCRuntimeClass@@XZ)
Debug/职工档案.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

解决方案 »

  1.   

    你的CEmployee是不是由CObject类派生下来的
    在.cpp文件中加一行IMPLEMENT_DYNCREATE(CEmployee, CObject)
    在.h文件的类定义中加上DECLARE_DYNCREATE(CEmployee)
      

  2.   

    在.cpp文件中的函数以外加一行IMPLEMENT_DYNCREATE(CEmployee, CObject)
    末尾不要有分号
    在.h文件的类定义“中“加上DECLARE_DYNCREATE(CEmployee)末尾也不要有分号