编译能通过.但是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
啥意思?
怎么解决法?

解决方案 »

  1.   

    是不是缺少什么lib之类的或者dll之类的
      

  2.   

    没有将 cpp 文件添加进来吧?
      

  3.   

    程序编译完后连接时出了问题,解决方法:
    1. rebuild all
    2. 出问题的源文件有问题
      

  4.   

    出现unresolved external 这类错误的时候就是
    函数只进行了声明没有定义
    或者你用了外部的文件那么可能link少lib文件
    或者你自己的函数没有定义
      

  5.   

    好的,俺试试,其实已经试过了,是实现一个如QQlist的框架,
    把声明文件加进去,又引进来其实的错误!!,不是一个类吗,为什么会这样?
    有兴趣看看吧!
    实现了给小弟说一下,兄弟很菜!!
    http://www.codeguru.com/Cpp/controls/controls/article.php/c2155
      

  6.   

    应该没有问题的。我以前看过的。你
    #include "GfxSplitterWnd.h"时不要放在
    你的stdfx.h哪儿。放到比如dialog类或者mainframe前面
    然后看看用到函数缺少什么lib就link加上什么lib,我急得没有问题。到时那个代码不严格有几个地方有小错误需要修改才更好。很久以前做过。现在忘记了
      

  7.   

    请问zjg751206!!
    我把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)
    你看这是什么地方的错误????