注册 登录
编程论坛 VC++/MFC

error LNK2019: unresolved external symbol

斯拉万月 发布于 2012-05-16 09:28, 405 次点击
在vs2008中编译时出现错误error LNK2019: unresolved external symbol "public: class CDrawEDoc * __thiscall CDrawEView::GetDocument(void)const " (?GetDocument@CDrawEView@@QBEPAVCDrawEDoc@@XZ) referenced in function "public: virtual int __thiscall CDlgSanx::OnInitDialog(void)" (?OnInitDialog@CDlgSanx@@UAEHXZ)
 请大家帮忙看看怎么回事

代码如下:
#pragma once
#include "afx.h"

class CBaseU :public CObject
{
public:
    DECLARE_SERIAL(CBaseU)   //是基类可序列化操作

   
public:
    int     m_type;          //图元的类型
    COLORREF  m_color;       //图元的颜色   
    CString    m_Snumber;      //图元的编号
    CString    m_description;  
    CPoint    m_postion;     //图元左上角的位置
    UINT      m_lineStyle;
    int       m_lineWidth;   

public:
     CBaseU();
     CBaseU(const CBaseU& basemap);
    ~CBaseU(){}

    CBaseU operator=(const CBaseU& basemap);   //重载符号
     virtual CBaseU* Copy(){return NULL;}         //图元指针copy
    virtual void Init();                          //初始化变量值
    virtual int GetType(){return m_type;}         //获取图元类型
    COLORREF  GetColor(){return m_color;}
    void      SetColor(COLORREF color){m_color=color;}

    virtual void Draw(CDC* pDC ,CPoint o_p,int m_size){};
    virtual void Serialize(CArchive& ar);


};
1 回复
#2
donggegege2012-05-16 13:14
#include "afx.h"

这是什么灰机??
1