Solved

external link encounter when linking CDocument, App

Posted on 2004-08-13
4
245 Views
Last Modified: 2013-11-20
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);
}
0
Comment
Question by:mwcmp
  • 2
  • 2
4 Comments
 
LVL 19

Expert Comment

by:drichards
ID: 11796505
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?
0
 

Author Comment

by:mwcmp
ID: 11798811
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() );
0
 
LVL 19

Accepted Solution

by:
drichards earned 100 total points
ID: 11798827
Closer.  Now it is complaining that there is no symbol 'setPointDetails' in CTestApp.  If your first post was correct, it looks like you changed it to just 'setDeatils'?  Where are you referencing 'setPointDetails' in your code?  The line you list is 'setDetails' which is not the same.  What does the CTestView::AddPoint method look like?
0
 

Author Comment

by:mwcmp
ID: 11798867
I found where my problem lies. Thanks alot! :)
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Hibernate methods 2 71
twoTwo  challenge 35 101
ShiftLeft challenge 21 80
ASP.NET C# MessageBox.Show Showing a modal dialog box or form when the application ... 2 122
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question