-
July 25th, 2014, 12:04 PM
#1
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.
-
July 25th, 2014, 12:08 PM
#2
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?
-
July 25th, 2014, 12:48 PM
#3
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.
-
July 25th, 2014, 01:13 PM
#4
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.
-
July 25th, 2014, 02:10 PM
#5
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.
-
July 25th, 2014, 02:17 PM
#6
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 *"?
-
July 25th, 2014, 02:38 PM
#7
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.
-
July 25th, 2014, 02:42 PM
#8
Re: 7 linking errors (LNK2001) compiling (release) emule with vs 2008
Originally Posted by giquem
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|