我有一个程序在DEBUG时完全正确,但在RELEASE时取出现如下的错误:error LNK2001: unresolved external symbol "protected: void __thiscall CBrowserView::OnMyAddress(unsigned int)" (?OnMyAddress@CBrowserView@@IAEXI@Z)
Release/Browser.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.部分代码如下:protected:
//{{AFX_MSG(CBrowserView)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
afx_msg void OnMyAddress(UINT nID);
//}}AFX_MSG
////////////////////////////////////////////////////////////////////////////
BEGIN_MESSAGE_MAP(CBrowserView, CHtmlView)
//{{AFX_MSG_MAP(CBrowserView)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
ON_COMMAND_RANGE(IDC_BUTTON1,IDC_BUTTON3,OnMyAddress)
//}}AFX_MSG_MAP
// Standard printing commands ON_COMMAND(ID_FILE_PRINT, CHtmlView::OnFilePrint)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////
void CBrowserView::OnMyAddress(UINT nID)
{
switch(nID)
{
case IDC_BUTTON1:
break;
case IDC_BUTTON2:
break;
case IDC_BUTTON3:
break;
}
}
Release/Browser.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.部分代码如下:protected:
//{{AFX_MSG(CBrowserView)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
afx_msg void OnMyAddress(UINT nID);
//}}AFX_MSG
////////////////////////////////////////////////////////////////////////////
BEGIN_MESSAGE_MAP(CBrowserView, CHtmlView)
//{{AFX_MSG_MAP(CBrowserView)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
ON_COMMAND_RANGE(IDC_BUTTON1,IDC_BUTTON3,OnMyAddress)
//}}AFX_MSG_MAP
// Standard printing commands ON_COMMAND(ID_FILE_PRINT, CHtmlView::OnFilePrint)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////
void CBrowserView::OnMyAddress(UINT nID)
{
switch(nID)
{
case IDC_BUTTON1:
break;
case IDC_BUTTON2:
break;
case IDC_BUTTON3:
break;
}
}
解决方案 »
- 在WIN7下对Program Files目录的权限问题
- 请问各位高手,pe文件中的imagebase倒是指的是什么,addressofentrypoint又是什么,他们有什么区别
- 问一个快捷键的问题
- 请问FREETEXTBOX可否用于MFC WINDOWS编程,还有FCKEditor可以吗?
- 经典书籍下载
- 请问:如果在程序中遍历一个project中的所有文件???
- 救命啊,有谁做过BMP格式的图像旋转和镜像的
- 如何在FormView中实现属性页呀!
- 急,在线等待,关于建立windows服务的问题!
- MFC调用系统API,实时地获取硬盘读写速率。类似于Win7中资源监视器那样
- 可否做个程序运行时把本机设为网关,然后上层程序所发的ip包都流回来
- 如何手动打开文件???
一般这种错误都是因为某个.lib里面没有该函数,或者函数定义错误导致