Link to home
Start Free TrialLog in
Avatar of mwcmp
mwcmp

asked on

external link encounter when linking CDocument, App

GuiderView.obj : error LNK2019: unresolved external symbol "public: void __thiscall CGuiderApp::setPointDetails(class CString,class CString,class CString,class PointListStorage *)" (?setPointDetails@CGuiderApp@@QAEXVCString@@V2@1PAVPointListStorage@
@@Z) referenced in function "public: void __thiscall CGuiderView::AddPoint(class CString,class CString,class CString)" (?AddPoint@CGuiderView@@QAEXVCString@@00@Z)
X86Rel/Guider.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.


I have got this compile error. Anyone knows how to resolve this?
The error occurs with this line:
     theApp.setDetails( a, b, c, GetDocument() );

//the method in theApp that is being called
void CTestApp::setDetails( const CString &a, CString b, c, ListStorage* pDoc )
{
      pDoc->setDetails( a, b, c);
}
Avatar of drichards
drichards

The error is referencing 'CGuiderApp::setPointDetails' in function 'CGuiderView::AddPoint'.  Where are they since the lines of code you list are in CTestApp and have completely different method names involved?  Do you have a cut-and-paste problem somewhere or an incorrect header included?
Avatar of mwcmp

ASKER

Sorry. Cause I edited the codes that I pasted. Therefore, the error goes like this.


TestView.obj : error LNK2019: unresolved external symbol "public: void __thiscall CTestApp::setPointDetails(class CString,class CString,class CString,class PointListStorage *)" (?setPointDetails@CTestApp@@QAEXVCString@@V2@1PAVListStorage@
@@Z) referenced in function "public: void __thiscall CTestView::AddPoint(class CString,class CString,class CString)" (?AddPoint@CTestView@@QAEXVCString@@00@Z)
X86Rel/Test.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

And yes, the following line of code lies in the CTestView class.
   theApp.setDetails( a, b, c, GetDocument() );
ASKER CERTIFIED SOLUTION
Avatar of drichards
drichards

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mwcmp

ASKER

I found where my problem lies. Thanks alot! :)