帮我看看:编译错误,无法定位错误...

jzp12 2007-04-30 01:28:15
ScribbleView.obj : error LNK2001: unresolved external symbol "protected: void __thiscall CScribbleView::OnMouseMove(unsigned int,class CPoint)" (?OnMouseMove@CScribbleView@@IAEXIVCPoint@@@Z)
ScribbleView.obj : error LNK2001: unresolved external symbol "protected: void __thiscall CScribbleView::OnLButtonUp(unsigned int,class CPoint)" (?OnLButtonUp@CScribbleView@@IAEXIVCPoint@@@Z)
ScribbleView.obj : error LNK2001: unresolved external symbol "protected: void __thiscall CScribbleView::OnLButtonDown(unsigned int,class CPoint)" (?OnLButtonDown@CScribbleView@@IAEXIVCPoint@@@Z)
Debug/Scribble.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.
...全文
183 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
jzp12 2007-04-30
  • 打赏
  • 举报
回复
谢谢大家,我已经解决了.
wltg2001 2007-04-30
  • 打赏
  • 举报
回复
另外你上面贴的是头文件,看看相应的CPP文件吧,里面应该没有那几个函数。
wltg2001 2007-04-30
  • 打赏
  • 举报
回复
链接错误:好像没有实现那几个消息处理函数,不过MFC好像不可能出现这处情况吧。如果你是用ClassWizard的话。
3m2u 2007-04-30
  • 打赏
  • 举报
回复
在文件管理中把ScribbleView.cpp加到项目里
huaren801007 2007-04-30
  • 打赏
  • 举报
回复
确保在ScribbleView.cpp文件中包含了头文件并且执行了3个函数OnMouseMove、OnLButtonUp、OnLButtonDown
ouyh12345 2007-04-30
  • 打赏
  • 举报
回复
只声明了没实现
jzp12 2007-04-30
  • 打赏
  • 举报
回复
// ScribbleView.h : interface of the CScribbleView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_SCRIBBLEVIEW_H__47A9A0C3_E21E_46AD_A0A5_8C335A9D84CE__INCLUDED_)
#define AFX_SCRIBBLEVIEW_H__47A9A0C3_E21E_46AD_A0A5_8C335A9D84CE__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


class CScribbleView : public CView
{
protected: // create from serialization only
CScribbleView();
DECLARE_DYNCREATE(CScribbleView)

// Attributes
public:
CScribbleDoc* GetDocument();

// Operations
public:

// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CScribbleView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL

// Implementation
public:
virtual ~CScribbleView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
//{{AFX_MSG(CScribbleView)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG

//add by jzp 070429
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
//end add by jzp 070429

DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG // debug version in ScribbleView.cpp
inline CScribbleDoc* CScribbleView::GetDocument()
{ return (CScribbleDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_SCRIBBLEVIEW_H__47A9A0C3_E21E_46AD_A0A5_8C335A9D84CE__INCLUDED_)

请大家帮我看看...急
信徒5257 2007-04-30
  • 打赏
  • 举报
回复
你应该把ScribbleView的源码贴出来.
mochen5460 2007-04-30
  • 打赏
  • 举报
回复
这个应该是没包含头文件

16,472

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧