CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Jul 2014
    Posts
    4

    Unhappy 7 linking errors (LNK2001) compiling (release) emule with vs 2008

    Hellow!. My first post is for ask help. These are the 7 errors:

    1>Search.obj : error LNK2001: sÃ*mbolo externo "public: void __thiscall CKademliaWnd::UpdateSearchGraph(class Kademlia::CLookupHistory *)" (?UpdateSearchGraph@CKademliaWnd@@QAEXPAVCLookupHistory@Kademlia@@@Z) sin resolver

    1>KademliaWnd.obj : error LNK2001: sÃ*mbolo externo "protected: virtual int __thiscall CKademliaWnd::OnCommand(unsigned int,long)" (?OnCommand@CKademliaWnd@@MAEHIJ@Z) sin resolver

    1>KademliaWnd.obj : error LNK2001: sÃ*mbolo externo "protected: void __thiscall CKademliaWnd::UpdateButtonTitle(bool)" (?UpdateButtonTitle@CKademliaWnd@@IAEX_N@Z) sin resolver

    1>KademliaWnd.obj : error LNK2001: sÃ*mbolo externo "protected: void __thiscall CKademliaWnd::OnNMDblclkSearchlist(struct tagNMHDR *,long *)" (?OnNMDblclkSearchlist@CKademliaWnd@@IAEXPAUtagNMHDR@@PAJ@Z) sin resolver

    1>KademliaWnd.obj : error LNK2001: sÃ*mbolo externo "protected: void __thiscall CKademliaWnd::OnListModifiedSearchlist(struct tagNMHDR *,long *)" (?OnListModifiedSearchlist@CKademliaWnd@@IAEXPAUtagNMHDR@@PAJ@Z) sin resolver

    1>KademliaWnd.obj : error LNK2001: sÃ*mbolo externo "public: void __thiscall CKademliaWnd::ShowLookupGraph(bool)" (?ShowLookupGraph@CKademliaWnd@@QAEX_N@Z) sin resolver

    1>KadContactListCtrl.obj : error LNK2001: sÃ*mbolo externo "public: void __thiscall CKademliaWnd::UpdateContactCount(void)" (?UpdateContactCount@CKademliaWnd@@QAEXXZ) sin resolver

    1>Release_vc9\emule.exe : fatal error LNK1120: 7 externos sin resolver

    All errors are related to "KademliaWnd.h", I think. But this file is in the project, as "KademliaWnd.cpp", of course! In addition, if I look the files code, I can see this, for example:

    KademliaWind.cpp:
    BEGIN_MESSAGE_MAP(CKademliaWnd, CResizableDialog)
    ...
    ON_NOTIFY(NM_DBLCLK, IDC_SEARCHLIST, OnNMDblclkSearchlist)
    ON_NOTIFY(LVN_ITEMCHANGED, IDC_SEARCHLIST, OnListModifiedSearchlist)

    and in KademliaWnd.h:
    DECLARE_MESSAGE_MAP()
    ...
    afx_msg void OnNMDblclkSearchlist(NMHDR *pNMHDR, LRESULT *pResult);
    afx_msg void OnListModifiedSearchlist(NMHDR *pNMHDR, LRESULT *pResult);

    KademliaWnd.cpp includes KademliaWnd.h, of course.
    If it can help, I will post all the files involved in this problem. Many thanks in advance.

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: 7 linking errors (LNK2001) compiling (release) emule with vs 2008

    Looks like the file that implements CKademliaWnd isn't included in your build. If you look in your .cpp files can you find an implementation of CKademliaWnd::UpdateSearchGraph?

  3. #3
    Join Date
    Jul 2014
    Posts
    4

    Re: 7 linking errors (LNK2001) compiling (release) emule with vs 2008

    Thanks for your quickly answer. What do you mean exactly with "file that implements CKademliaWnd"? I can say that exist the files LookupHistory (.cpp and .h) and are included in the project, but don't contain the expression "UpdateSearchGraph".
    Hovewer, it exist a file named Search where I can see "UpdateSearchGraph":
    ...
    theApp.emuledlg->kademliawnd->UpdateSearchGraph(m_pLookupHistory);
    ...
    The file Search.cpp includes KademliaWnd.h and LookupHistory.h in the beggining:
    #include "./Kademlia.h"
    #include "../utils/LookupHistory.h"

    Both Search files are also included in the project.

    This is that I found.

  4. #4
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: 7 linking errors (LNK2001) compiling (release) emule with vs 2008

    The function UpdateSearchGraph, and others that it lists has been defined most likely in a header file and possibly used in a .cpp file, but the linker can't find the implementation of that function. Is CKademliaWnd a class you wrote yourself? Perhaps there's a .Lib file you need to add to your project.

  5. #5
    Join Date
    Jul 2014
    Posts
    4

    Re: 7 linking errors (LNK2001) compiling (release) emule with vs 2008

    Not at all, GCDEF. KademiaWnd is a part of the source code of eMule. And I have all the necessary libs for to compile it. All are included in the sources. And all these libs are linked. Thanks again for your help.

  6. #6
    Join Date
    Jul 2014
    Posts
    4

    Re: 7 linking errors (LNK2001) compiling (release) emule with vs 2008

    May you can help me in these errors:
    1>KademliaWnd.obj : error LNK2001: sÃ*mbolo externo "protected: void __thiscall CKademliaWnd::OnNMDblclkSearchlist(struct tagNMHDR *,long *)" (?OnNMDblclkSearchlist@CKademliaWnd@@IAEXPAUtagNMHDR@@PAJ@Z) sin resolver

    1>KademliaWnd.obj : error LNK2001: sÃ*mbolo externo "protected: void __thiscall CKademliaWnd::OnListModifiedSearchlist(struct tagNMHDR *,long *)" (?OnListModifiedSearchlist@CKademliaWnd@@IAEXPAUtagNMHDR@@PAJ@Z) sin resolver

    May be I have to modify somethink here: "NMHDR *pNMHDR, LRESULT *pResult"? What exact means this "struct tagNMHDR *,long *"?

  7. #7
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: 7 linking errors (LNK2001) compiling (release) emule with vs 2008

    There's no other way to put it. The linker can't find the implementation of those function. You have the source code, so only you can determine if they exist and why the linker can't find them.

  8. #8
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: 7 linking errors (LNK2001) compiling (release) emule with vs 2008

    Quote Originally Posted by giquem View Post
    May you can help me in these errors:
    1>KademliaWnd.obj : error LNK2001: sÃ*mbolo externo "protected: void __thiscall CKademliaWnd::OnNMDblclkSearchlist(struct tagNMHDR *,long *)" (?OnNMDblclkSearchlist@CKademliaWnd@@IAEXPAUtagNMHDR@@PAJ@Z) sin resolver

    1>KademliaWnd.obj : error LNK2001: sÃ*mbolo externo "protected: void __thiscall CKademliaWnd::OnListModifiedSearchlist(struct tagNMHDR *,long *)" (?OnListModifiedSearchlist@CKademliaWnd@@IAEXPAUtagNMHDR@@PAJ@Z) sin resolver
    Sure!
    There is no any .cpp/.h file included in your project (nor any .lib file) that contains the implementations of
    CKademliaWnd::OnNMDblclkSearchlist(struct tagNMHDR *,long *)
    CKademliaWnd::OnListModifiedSearchlist(struct tagNMHDR *,long *)
    Victor Nijegorodov

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured