Solved

external link encounter when linking CDocument, App

Posted on 2004-08-13
4
225 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
I found where my problem lies. Thanks alot! :)
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now