编译能通过.但是Link的时候就出现这种提示:
MainFrm.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CGfxOutBarCtrl::~CGfxOutBarCtrl(void)" (??1CGfxOutBarCtrl@@UAE@XZ)
MainFrm.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CGfxSplitterWnd::~CGfxSplitterWnd(void)" (??1CGfxSplitterWnd@@UAE@XZ)
MainFrm.obj : error LNK2001: unresolved external symbol "public: __thiscall CGfxOutBarCtrl::CGfxOutBarCtrl(void)" (??0CGfxOutBarCtrl@@QAE@XZ)
MainFrm.obj : error LNK2001: unresolved external symbol "public: __thiscall CGfxSplitterWnd::CGfxSplitterWnd(void)" (??0CGfxSplitterWnd@@QAE@XZ)
MainFrm.obj : error LNK2001: unresolved external symbol "public: int __thiscall CGfxOutBarCtrl::AddFolder(char const *,unsigned long)" (?AddFolder@CGfxOutBarCtrl@@QAEHPBDK@Z)
MainFrm.obj : error LNK2001: unresolved external symbol "public: class CImageList * __thiscall CGfxOutBarCtrl::SetImageList(class CImageList *,int)" (?SetImageList@CGfxOutBarCtrl@@QAEPAVCImageList@@PAV2@H@Z)
MainFrm.obj : error LNK2001: unresolved external symbol "public: int __thiscall CGfxOutBarCtrl::Create(unsigned long,struct tagRECT const &,class CWnd *,unsigned int,unsigned long)" (?Create@CGfxOutBarCtrl@@QAEHKABUtagRECT@@PAVCWnd@@IK@Z)
Debug/demo.exe : fatal error LNK1120: 7 unresolved externals
啥意思?
怎么解决法?
MainFrm.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CGfxOutBarCtrl::~CGfxOutBarCtrl(void)" (??1CGfxOutBarCtrl@@UAE@XZ)
MainFrm.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CGfxSplitterWnd::~CGfxSplitterWnd(void)" (??1CGfxSplitterWnd@@UAE@XZ)
MainFrm.obj : error LNK2001: unresolved external symbol "public: __thiscall CGfxOutBarCtrl::CGfxOutBarCtrl(void)" (??0CGfxOutBarCtrl@@QAE@XZ)
MainFrm.obj : error LNK2001: unresolved external symbol "public: __thiscall CGfxSplitterWnd::CGfxSplitterWnd(void)" (??0CGfxSplitterWnd@@QAE@XZ)
MainFrm.obj : error LNK2001: unresolved external symbol "public: int __thiscall CGfxOutBarCtrl::AddFolder(char const *,unsigned long)" (?AddFolder@CGfxOutBarCtrl@@QAEHPBDK@Z)
MainFrm.obj : error LNK2001: unresolved external symbol "public: class CImageList * __thiscall CGfxOutBarCtrl::SetImageList(class CImageList *,int)" (?SetImageList@CGfxOutBarCtrl@@QAEPAVCImageList@@PAV2@H@Z)
MainFrm.obj : error LNK2001: unresolved external symbol "public: int __thiscall CGfxOutBarCtrl::Create(unsigned long,struct tagRECT const &,class CWnd *,unsigned int,unsigned long)" (?Create@CGfxOutBarCtrl@@QAEHKABUtagRECT@@PAVCWnd@@IK@Z)
Debug/demo.exe : fatal error LNK1120: 7 unresolved externals
啥意思?
怎么解决法?
解决方案 »
- 问一个API数组定义问题?
- opengl鼠标拖拽
- 高分求程序,希望高人给一个vc版本的语音聊天程序下载地址
- 一个框架里两个view如何通信
- 我使用DirectShow来控制从 DVD->硬盘 导入数据,如何检测磁盘满了
- 各位XDJM,请问通过IP如何获得主机网卡的MAC地址啊?急用!谢谢啦!
- 谁能提供一个从关系数据库导出数据到XML文件,将XML文件导入到关系数据库的例子(分不够再加)
- 怒送杀人分!!!!
- activex control中使用CWebBrowser控件的问题? (之前那个帖子分数忘记选了)
- 如何在vs2008中调用动态链接库
- 如何得到其他程序窗口内的文字
- 重叠i/o和完成端口的问题
1. rebuild all
2. 出问题的源文件有问题
函数只进行了声明没有定义
或者你用了外部的文件那么可能link少lib文件
或者你自己的函数没有定义
把声明文件加进去,又引进来其实的错误!!,不是一个类吗,为什么会这样?
有兴趣看看吧!
实现了给小弟说一下,兄弟很菜!!
http://www.codeguru.com/Cpp/controls/controls/article.php/c2155
#include "GfxSplitterWnd.h"时不要放在
你的stdfx.h哪儿。放到比如dialog类或者mainframe前面
然后看看用到函数缺少什么lib就link加上什么lib,我急得没有问题。到时那个代码不严格有几个地方有小错误需要修改才更好。很久以前做过。现在忘记了
我把GfxSplitterwnd.h和OutBardemo.h,以及声明文件GfxSplitterwnd.cpp和OutBardemo.cpp
加进了工程项目中.稍微改了一点,编译已经不出错了,但是LINKING的时候出现:
ompiling...
OutBarDemo.cpp
Linking...
OutBarDemo.obj : error LNK2005: "public: __thiscall CAboutDlg::CAboutDlg(void)" (??0CAboutDlg@@QAE@XZ) already defined in demo.obj
OutBarDemo.obj : error LNK2005: "protected: virtual void __thiscall CAboutDlg::DoDataExchange(class CDataExchange *)" (?DoDataExchange@CAboutDlg@@MAEXPAVCDataExchange@@@Z) already defined in demo.obj
OutBarDemo.obj : error LNK2005: "protected: static struct AFX_MSGMAP const * __stdcall CAboutDlg::_GetBaseMessageMap(void)" (?_GetBaseMessageMap@CAboutDlg@@KGPBUAFX_MSGMAP@@XZ) already defined in demo.obj
OutBarDemo.obj : error LNK2005: "protected: virtual struct AFX_MSGMAP const * __thiscall CAboutDlg::GetMessageMap(void)const " (?GetMessageMap@CAboutDlg@@MBEPBUAFX_MSGMAP@@XZ) already defined in demo.obj
OutBarDemo.obj : error LNK2005: "protected: static struct AFX_MSGMAP const CAboutDlg::messageMap" (?messageMap@CAboutDlg@@1UAFX_MSGMAP@@B) already defined in demo.obj
OutBarDemo.obj : error LNK2005: "private: static struct AFX_MSGMAP_ENTRY const * const CAboutDlg::_messageEntries" (?_messageEntries@CAboutDlg@@0QBUAFX_MSGMAP_ENTRY@@B) already defined in demo.obj
Debug/demo.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.demo.exe - 7 error(s), 0 warning(s)
你看这是什么地方的错误????