Starter App made with AppWizard of VC 5.0 gives me link errors 
Author Message
 Starter App made with AppWizard of VC 5.0 gives me link errors

Hi
Someaone has had this problem?
I'm a newbie trying to learn VC.
I've tried to follow the scribble tutorial, but when i create the
starter app, following  step by step  the tutorial, i have 17 link
errors!!
I think the wizard should create a safe framework in which i must
introduce my own errors. Is n't?
The errors are mainly about symbols in ScribbleView already defined in
the main program and finaly two unresolved external sumbols.

I can't find a reference to this problem in th KB, bug list or
anywhere
It's very frustrating to be bloked in a step in which i've had no
chance to put in anything of my own.
Can you help me?
Best regards
Antoni



Sat, 15 Jan 2000 03:00:00 GMT  
 Starter App made with AppWizard of VC 5.0 gives me link errors

Antoni-

The CDROM has correct versions of each stage of the tutorial, including the
make files and the source code.

If I were you I would compare my own make files (or project file) with the
correct ones on the CDROM.  I would also make sure the distributed project
file runs properly.  Then I would look for differences to find my own
error.

It is a little tough in 5.0 to examine the project file because it is not
as readable as the old ascii make files, at least I think that's the case,
I haven't used 5 much.  But you can still find all the settings using the
IDE to examine the various project configurations after loading the
project.  In this way you can search for differences.

Unresolved externals could means you are not properly specifying all the
libraries or other files you need to link to.  You can easily check this
against the distributed project.

As far as duplicate symbols, you might be including header files where you
don't need them, or have header files that are not protected using the
standard #ifdef/#define/#endif mechanism.

Hey, no one said MSVC/MFC was easy!

-Leigh



Quote:
> Hi
> Someaone has had this problem?
> I'm a newbie trying to learn VC.
> I've tried to follow the scribble tutorial, but when i create the
> starter app, following  step by step  the tutorial, i have 17 link
> errors!!
> I think the wizard should create a safe framework in which i must
> introduce my own errors. Is n't?
> The errors are mainly about symbols in ScribbleView already defined in
> the main program and finaly two unresolved external sumbols.

> I can't find a reference to this problem in th KB, bug list or
> anywhere
> It's very frustrating to be bloked in a step in which i've had no
> chance to put in anything of my own.
> Can you help me?
> Best regards
> Antoni



Sat, 15 Jan 2000 03:00:00 GMT  
 Starter App made with AppWizard of VC 5.0 gives me link errors

It would help if you posted the text of the error messages.

The appwizard does generate "safe" code, so I would presume that either
something is corrupted in your install (very possible) or that one of
the files that was generated is corrupted (i.e. its sitting on a bad
sector) or something along those lines.

--
Author for Visual C++ Devloper          http://www.pinpub.com/vcd/
---
Believe it or not...
                It's just me....
---



Sat, 15 Jan 2000 03:00:00 GMT  
 Starter App made with AppWizard of VC 5.0 gives me link errors

Hi,Jjim, thanks for your answer

Quote:

>It would help if you posted the text of the error messages.

Ok, here they are.Enjoy it

--------------------Configuration: scribble - Win32
Debug--------------------
Linking...

scribbleView.obj : error LNK2005: "protected: static struct AFX_MSGMAP

already defined in scribble.obj

scribbleView.obj : error LNK2005: "private: static struct
AFX_MSGMAP_ENTRY const * const  CAboutDlg::_messageEntries"

in scribble.obj

scribbleView.obj : error LNK2005: "protected: static struct AFX_MSGMAP
const  CScribbleApp::messageMap"

scribble.obj

scribbleView.obj : error LNK2005: "private: static struct
AFX_MSGMAP_ENTRY const * const  CScribbleApp::_messageEntries"

defined in scribble.obj

scribbleView.obj : error LNK2005: "class CScribbleApp  theApp"

scribbleView.obj : error LNK2005: "protected: static struct AFX_MSGMAP
const * __stdcall CScribbleApp::_GetBaseMessageMap(void)"

defined in scribble.obj

scribbleView.obj : error LNK2005: "protected: virtual struct
AFX_MSGMAP const * __thiscall CScribbleApp::GetMessageMap(void)const "

scribble.obj

scribbleView.obj : error LNK2005: "public: __thiscall

defined in scribble.obj

scribbleView.obj : error LNK2005: "public: virtual int __thiscall

already defined in scribble.obj

scribbleView.obj : error LNK2005: "public: __thiscall

scribble.obj

scribbleView.obj : error LNK2005: "protected: virtual void __thiscall
CAboutDlg::DoDataExchange(class CDataExchange *)"

in scribble.obj

scribbleView.obj : error LNK2005: "protected: static struct AFX_MSGMAP
const * __stdcall CAboutDlg::_GetBaseMessageMap(void)"

in scribble.obj

scribbleView.obj : error LNK2005: "protected: virtual struct
AFX_MSGMAP const * __thiscall CAboutDlg::GetMessageMap(void)const "

scribble.obj

scribbleView.obj : error LNK2005: "public: void __thiscall

already defined in scribble.obj

scribble.obj : error LNK2001: unresolved external symbol "public:
static struct CRuntimeClass const  CScribbleView::classCScribbleView"

scribbleView.obj : error LNK2001: unresolved external symbol "public:
static struct CRuntimeClass const  CScribbleView::classCScribbleView"

Debug/scribble.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
scribble.exe - 17 error(s), 0 warning(s)



Sun, 16 Jan 2000 03:00:00 GMT  
 Starter App made with AppWizard of VC 5.0 gives me link errors

Check the includes in scribbleview.cpp, does one of them happen to say

#include "scribble.cpp"

It appears that somehow the CAboutDLG class and CScribbleApp class are
being implemented more then once.  This is definatly not default
behavior.

--
Author for Visual C++ Devloper          http://www.pinpub.com/vcd/
---
Isn't it a bit unnerving that doctors call what they do "practice"?
---



Sun, 16 Jan 2000 03:00:00 GMT  
 Starter App made with AppWizard of VC 5.0 gives me link errors

Quote:

>Check the includes in scribbleview.cpp, does one of them happen to say
>#include "scribble.cpp"

This are  the #include  lines found by the " search in files"  option
in edit menu, no include "scribble.cpp"
Searching for '#include'...
C:\Archivos de
programa\DevStudio\MyProjects\scribble\ChildFrm.cpp(4):#include
"stdafx.h"
C:\Archivos de
programa\DevStudio\MyProjects\scribble\ChildFrm.cpp(5):#include
"scribble.h"
C:\Archivos de
programa\DevStudio\MyProjects\scribble\ChildFrm.cpp(7):#include
"ChildFrm.h"
C:\Archivos de
programa\DevStudio\MyProjects\scribble\MainFrm.cpp(4):#include
"stdafx.h"
C:\Archivos de
programa\DevStudio\MyProjects\scribble\MainFrm.cpp(5):#include
"scribble.h"
C:\Archivos de
programa\DevStudio\MyProjects\scribble\MainFrm.cpp(7):#include
"MainFrm.h"
C:\Archivos de
programa\DevStudio\MyProjects\scribble\StdAfx.cpp(5):#include
"stdafx.h"
C:\Archivos de
programa\DevStudio\MyProjects\scribble\StdAfx.h(15):#include
<afxwin.h>         // MFC core and standard components
C:\Archivos de
programa\DevStudio\MyProjects\scribble\StdAfx.h(16):#include
<afxext.h>         // MFC extensions
C:\Archivos de
programa\DevStudio\MyProjects\scribble\StdAfx.h(17):#include
<afxdisp.h>        // MFC OLE automation classes
C:\Archivos de
programa\DevStudio\MyProjects\scribble\StdAfx.h(19):#include
<afxcmn.h>   // MFC support for Windows Common Controls
C:\Archivos de
programa\DevStudio\MyProjects\scribble\scribble.cpp(4):#include
"stdafx.h"
C:\Archivos de
programa\DevStudio\MyProjects\scribble\scribble.cpp(5):#include
"scribble.h"
C:\Archivos de
programa\DevStudio\MyProjects\scribble\scribble.cpp(7):#include
"MainFrm.h"
C:\Archivos de
programa\DevStudio\MyProjects\scribble\scribble.cpp(8):#include
"ChildFrm.h"
C:\Archivos de
programa\DevStudio\MyProjects\scribble\scribble.cpp(9):#include
"scribbleDoc.h"
C:\Archivos de
programa\DevStudio\MyProjects\scribble\scribble.cpp(10):#include
"scribbleView.h"
C:\Archivos de
programa\DevStudio\MyProjects\scribble\scribble.h(15):#include
"resource.h"       // main symbols
C:\Archivos de
programa\DevStudio\MyProjects\scribble\scribble.rc(3):#include
"resource.h"
C:\Archivos de
programa\DevStudio\MyProjects\scribble\scribble.rc(11):#include
"afxres.h"
C:\Archivos de programa\DevStudio\MyProjects\scribble\scribble.rc(30):
"#include ""afxres.h""\r\n"
C:\Archivos de programa\DevStudio\MyProjects\scribble\scribble.rc(46):
"#include ""res\\scribble.rc2""  // non-Microsoft Visual C++ edited
resources\r\n"
C:\Archivos de programa\DevStudio\MyProjects\scribble\scribble.rc(47):
"#include ""l.esp\\afxres.rc""   // Standard components\r\n"
C:\Archivos de programa\DevStudio\MyProjects\scribble\scribble.rc(48):
"#include ""l.esp\\afxprint.rc"" // printing/print preview
resources\r\n"
C:\Archivos de
programa\DevStudio\MyProjects\scribble\scribble.rc(396):#include
"res\\scribble.rc2"  // non-Microsoft Visual C++ edited resources
C:\Archivos de
programa\DevStudio\MyProjects\scribble\scribble.rc(397):#include
"l.esp\\afxres.rc"   // Standard components
C:\Archivos de
programa\DevStudio\MyProjects\scribble\scribble.rc(398):#include
"l.esp\\afxprint.rc"  // printing/print preview resources
C:\Archivos de
programa\DevStudio\MyProjects\scribble\scribbleDoc.cpp(4):#include
"stdafx.h"
C:\Archivos de
programa\DevStudio\MyProjects\scribble\scribbleDoc.cpp(5):#include
"scribble.h"
C:\Archivos de
programa\DevStudio\MyProjects\scribble\scribbleDoc.cpp(7):#include
"scribbleDoc.h"
C:\Archivos de
programa\DevStudio\MyProjects\scribble\scribbleView.cpp(4):#include
"stdafx.h"
C:\Archivos de
programa\DevStudio\MyProjects\scribble\scribbleView.cpp(5):#include
"scribble.h"
C:\Archivos de
programa\DevStudio\MyProjects\scribble\scribbleView.cpp(7):#include
"scribbleDoc.h"
C:\Archivos de
programa\DevStudio\MyProjects\scribble\scribbleView.cpp(8):#include
"scribbleView.h"

Quote:
>It appears that somehow the CAboutDLG class and CScribbleApp class are
>being implemented more then once.  This is definatly not default
>behavior.

Not default means this is normal? In this case i think that, being the
first lesson, the problem and his solution should be expained in the
tutorial

Quote:
>--
>Author for Visual C++ Devloper              http://www.pinpub.com/vcd/

If i overcome this first problem i will look for your book in a
library. Who's the publisher?

Quote:
>Isn't it a bit unnerving that doctors call what they do "practice"?

I was'nt expecting a so undocumented problem in the first lesson...

Best rtegards

Antoni



Sun, 23 Jan 2000 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Spurious Link Errors in VC 5.0

2. VC 5.0 Link Error

3. VC 4.2 link error linking static libraries from VC 6.0

4. Making my apps VC 4.2 toolbars look like in VC 5

5. SDK Service Example gives warning under VC++Enterprice 5.0

6. making VC 5.0 and 6.0 coexist on the same machine

7. VC 6.0 -> VC 5.0 Error

8. Templates in library giving unresolved external when linked to app

9. Link Errors in VC.net that don't appear in VC 6.0

10. VC++6 convert to VC.Net link error

11. Question from the starter of VC++ 5.0!

12. Static smart pointer data member gives link error.

 

 
Powered by phpBB® Forum Software