GetMessageMap

本文介绍了一种常见的C++ GUI应用程序开发中遇到的问题:链接器错误LNK2001,具体涉及未解析的外部符号GetMessageMap。文章通过提供具体的错误信息及代码示例来帮助读者理解问题所在,并引导读者正确地定义和使用消息映射。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1>MainWnd.obj : error LNK2001: 无法解析的外部符号 "protected: virtual struct DuiLib::DUI_MSGMAP const * __thiscall CMainWnd::GetMessageMap(void)const " (?GetMessageMap@CMainWnd@@MBEPBUDUI_MSGMAP@DuiLib@@XZ)

 

增加消息

DUI_BEGIN_MESSAGE_MAP(CMainWnd, WindowImplBase)
    DUI_ON_MSGTYPE(DUI_MSGTYPE_CLICK, OnClick)
    DUI_END_MESSAGE_MAP()

 

 


 

--------------------Configuration: My - Win32 Debug-------------------- Compiling resources... Compiling... StdAfx.cpp Compiling... My.cpp MainFrm.cpp MyDoc.cpp MyView.cpp F:\My\MyView.cpp(59) : error C2065: 'dotMatrix_Liu' : undeclared identifier F:\My\MyView.cpp(59) : error C2109: subscript requires array or pointer type F:\My\MyView.cpp(59) : error C2109: subscript requires array or pointer type F:\My\MyView.cpp(108) : error C2039: 'DrawVectorName' : is not a member of 'CMyView' f:\my\myview.h(13) : see declaration of 'CMyView' F:\My\MyView.cpp(116) : error C2084: function 'const struct AFX_MSGMAP *__stdcall CMyView::_GetBaseMessageMap(void)' already has a body F:\My\MyView.cpp(116) : error C2084: function 'const struct AFX_MSGMAP *__thiscall CMyView::GetMessageMap(void) const' already has a body F:\My\MyView.cpp(116) : error C2374: 'protected: static struct AFX_MSGMAP const CMyView::messageMap' : redefinition; multiple initialization f:\my\myview.h(54) : see declaration of 'protected: static struct AFX_MSGMAP const CMyView::messageMap' F:\My\MyView.cpp(116) : error C2374: 'private: static struct AFX_MSGMAP_ENTRY const * const CMyView::_messageEntries' : redefinition; multiple initialization f:\my\myview.h(54) : see declaration of 'private: static struct AFX_MSGMAP_ENTRY const * const CMyView::_messageEntries' F:\My\MyView.cpp(118) : error C2509: 'OnKeyDown' : member function not declared in 'CMyView' f:\my\myview.h(13) : see declaration of 'CMyView' F:\My\MyView.cpp(123) : error C2040: 'dotMatrix_Liu' : 'unsigned char [16][16]' differs in levels of indirection from 'int' Generating Code... 执行 cl.exe 时出错. My.exe - 1 error(s), 0 warning(s) 怎么解决
最新发布
03-19
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值