mwcmp
asked on
external link encounter when linking CDocument, App
GuiderView.obj : error LNK2019: unresolved external symbol "public: void __thiscall CGuiderApp::setPointDetail s(class CString,class CString,class CString,class PointListStorage *)" (?setPointDetails@CGuiderA pp@@QAEXVC String@@V2 @1PAVPoint ListStorag e@
@@Z) referenced in function "public: void __thiscall CGuiderView::AddPoint(clas s CString,class CString,class CString)" (?AddPoint@CGuiderView@@QA EXVCString @@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);
}
@@Z) referenced in function "public: void __thiscall CGuiderView::AddPoint(clas
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);
}
The error is referencing 'CGuiderApp::setPointDetai ls' 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?
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 @@QAEXVCSt ring@@V2@1 PAVListSto rage@
@@Z) referenced in function "public: void __thiscall CTestView::AddPoint(class CString,class CString,class CString)" (?AddPoint@CTestView@@QAEX VCString@@ 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() );
TestView.obj : error LNK2019: unresolved external symbol "public: void __thiscall CTestApp::setPointDetails(
@@Z) referenced in function "public: void __thiscall CTestView::AddPoint(class CString,class CString,class CString)" (?AddPoint@CTestView@@QAEX
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I found where my problem lies. Thanks alot! :)