Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > Visual C++
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Visual C++ Questions specific to Microsoft's Visual C++. For questions not specific to this Microsoft version, use the C++ Programming forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 10th, 2006, 03:07 AM
Registered User
 
Join Date: Nov 2005
Location: Munich, , Germany.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default errors LNK2001 and LNK2019 with VS .net 2005

Hi All,

I have succeeded in compiling a massive project, originally from vc6 to VS .Net 2005.

Now, while linking I am having loads of linker errors with the above code.

LNK20019 and LNK2001. Giving error msg that some symbol is not found. Actually, the library with the symbol has been already compiled as dll.


I looked into the documentation. The errors may be caused by

1. use of Inline functions (2019, also sometimes 2001)

2. use of C Runtime LIbraries (2001)



I dont know how to solve this problem. Can anybody tell me what should I do to remove these errors ?

I know all the missing symbols are there and the libraries are my own, so I can also change the code of the libraries.


this is the buildlog of one of the projects in the solution.

I also attach the implementation of a small class which is referenced and the symbol (destructor of that class) is not found and results in the error.

I hope this helps you guys to guide me.

Command Line
Code:

Creating temporary file "c:\hardik\VidPIVSrc\VidPIV 3.0\CrossCorrelation\Debug\RSP0000183284168.rsp" with contents
[
/OUT:".\Debug/CrossCorrelation.dll" /INCREMENTAL /LIBPATH:"..\Lib\Debug" /DLL /MANIFEST /MANIFESTFILE:".\Debug\CrossCorrelation.dll.intermediate.manifest" /SUBSYSTEM:WINDOWS /IMPLIB:".\Debug/CrossCorrelation.lib" /MACHINE:X86 /FORCE:MULTIPLE ..\CrossCorrelationLib\Debug\CrossCorrelation.exp "..\vdpvtimelib\debug\vdpvtime.lib" "..\utilities\debug\vdpvutils.lib" "..\broker\debug\vdpvbroker.lib" "..\vdpvderivationslib\debug\vdpvderivations.lib" "..\crosscorrelationlib\debug\crosscorrelation.lib" "..\fakeimporter\debug\fakeimporter.lib" "..\vdpvannotationlib\debug\vdpvannotation.lib" "..\vdpvvector\debug\vdpvvector.lib" "..\vdpvvisualisations\debug\vdpvvisualisations.lib" "..\vdpvderived\debug\vdpvderived.lib"

"..\CrossCorrelationLib\Debug\CrossCorrelationlib.lib"

".\Debug\CrossCorrelation.res"

".\Debug\CrossCorrelation.dll.embed.manifest.res"
]
Creating command line "link.exe @"c:\hardik\VidPIVSrc\VidPIV 3.0\CrossCorrelation\Debug\RSP0000183284168.rsp" /NOLOGO /ERRORREPORT:PROMPT"
Output Window
Code:
Linking...
LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/FORCE' specification
crosscorrelation.lib(CrossCorrelation.obj) : warning LNK4006: _VdpvDllInfo@4 already defined in vdpvtime.lib(VdpvTime.dll); second definition ignored
crosscorrelation.lib(CrossCorrelation.obj) : warning LNK4006: _VdpvClassInfo@32 already defined in vdpvtime.lib(VdpvTime.dll); second definition ignored
crosscorrelation.lib(CrossCorrelation.obj) : warning LNK4006: _DllMain@12 already defined in vdpvderivations.lib(VdpvDerivations.dll); second definition ignored
crosscorrelation.lib(CorrelationCross.obj) : error LNK2019:unresolved external symbol "__declspec(dllimport) public: __thiscall int_iterator::~int_iterator(void)" (__imp_??1?$int_iterator@VCDerivedMap@@@@QAE@XZ) referenced in function "public: void __thiscall CCrossCorrelation::doCorrelation(struct CCorrelationThreadData &)" (?doCorrelation@CCrossCorrelation@@QAEXAAUCCorrelationThreadData@@@Z)
crosscorrelation.lib(CorrelationCross.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall CTemplateHandle::operator class CGrid *(void)const " (__imp_??B?$CTemplateHandle@VCGrid@@@@QBEPAVCGrid@@XZ) referenced in function "public: bool __thiscall CCrossCorrelation::Interrogate(class CTemplateHandleWithClsid const &,class CTemplateHandleWithClsid const &,class CTemplateHandleWithClsid const &,class CTemplateHandleWithClsid const &,class CSingleVectorMap *)" (?Interrogate@CCrossCorrelation@@QAE_NABV?$CTemplateHandleWithClsid@VCSingleBitmap@@@@ABV?$CTemplateHandleWithClsid@VCGrid@@@@01PAVCSingleVectorMap@@@Z)
crosscorrelation.lib(CorrelationViewerDlg.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall CTemplateHandle::operator class CGrid *(void)const " (__imp_??B?$CTemplateHandle@VCGrid@@@@QBEPAVCGrid@@XZ)
crosscorrelation.lib(CorrelationCross.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class CGrid * __thiscall CTemplateHandle::operator->(void)const " (__imp_??C?$CTemplateHandle@VCGrid@@@@QBEPAVCGrid@@XZ) referenced in function "public: bool __thiscall CCrossCorrelation::Interrogate(class CTemplateHandleWithClsid const &,class CTemplateHandleWithClsid const &,class CTemplateHandleWithClsid const &,class CTemplateHandleWithClsid const &,class CSingleVectorMap *)" (?Interrogate@CCrossCorrelation@@QAE_NABV?$CTemplateHandleWithClsid@VCSingleBitmap@@@@ABV?$CTemplateHandleWithClsid@VCGrid@@@@01PAVCSingleVectorMap@@@Z)
crosscorrelation.lib(FindBestPulseSeperationDlg.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class CGrid * __thiscall CTemplateHandle::operator->(void)const " (__imp_??C?$CTemplateHandle@VCGrid@@@@QBEPAVCGrid@@XZ)
crosscorrelation.lib(CorrelationCross.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall CTemplateHandleWithClsid::~CTemplateHandleWithClsid(void)" (__imp_??1?$CTemplateHandleWithClsid@VCSingleVectorMap@@@@UAE@XZ) referenced in function __unwindfunclet$?Apply@CCrossCorrelation@@UAEXPAVCDerivationData@@PAVCUIItemContext@@H@Z$0
crosscorrelation.lib(CorrelationViewerDlg.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall CTemplateHandleWithClsid::~CTemplateHandleWithClsid(void)" (__imp_??1?$CTemplateHandleWithClsid@VCSingleVectorMap@@@@UAE@XZ)
crosscorrelation.lib(CorrelationCross.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall CFindExclusions::~CFindExclusions(void)" (__imp_??1CFindExclusions@@UAE@XZ) referenced in function "public: virtual void __thiscall CCrossCorrelation::Apply(class CDerivationData *,class CUIItemContext *,int)" (?Apply@CCrossCorrelation@@UAEXPAVCDerivationData@@PAVCUIItemContext@@H@Z)
crosscorrelation.lib(FindBestPulseSeperationDlg.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall CFindExclusions::~CFindExclusions(void)" (__imp_??1CFindExclusions@@UAE@XZ)
crosscorrelation.lib(CorrelationCross.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall CTemplateHandle::operator class CSingleVectorMap *(void)const " (__imp_??B?$CTemplateHandle@VCSingleVectorMap@@@@QBEPAVCSingleVectorMap@@XZ) referenced in function "public: virtual void __thiscall CCrossCorrelation::Apply(class CDerivationData *,class CUIItemContext *,int)" (?Apply@CCrossCorrelation@@UAEXPAVCDerivationData@@PAVCUIItemContext@@H@Z)
crosscorrelation.lib(CorrelationCross.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class CSingleVectorMap * __thiscall CTemplateHandle::operator->(void)const " (__imp_??C?$CTemplateHandle@VCSingleVectorMap@@@@QBEPAVCSingleVectorMap@@XZ) referenced in function "public: virtual void __thiscall CCrossCorrelation::Apply(class CDerivationData *,class CUIItemContext *,int)" (?Apply@CCrossCorrelation@@UAEXPAVCDerivationData@@PAVCUIItemContext@@H@Z)
crosscorrelation.lib(CorrelationViewerDlg.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class CSingleVectorMap * __thiscall CTemplateHandle::operator->(void)const " (__imp_??C?$CTemplateHandle@VCSingleVectorMap@@@@QBEPAVCSingleVectorMap@@XZ)
crosscorrelation.lib(CorrelationCross.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall CFindExclusions::CFindExclusions(class CTreeHandler *,struct _TREEITEM *,class ATL::CStringT > > const &)" (__imp_??0CFindExclusions@@QAE@PAVCTreeHandler@@PAU_TREEITEM@@ABV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@@Z) referenced in function "public: virtual void __thiscall CCrossCorrelation::Apply(class CDerivationData *,class CUIItemContext *,int)" (?Apply@CCrossCorrelation@@UAEXPAVCDerivationData@@PAVCUIItemContext@@H@Z)
crosscorrelation.lib(FindBestPulseSeperationDlg.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall CFindExclusions::CFindExclusions(class CTreeHandler *,struct _TREEITEM *,class ATL::CStringT > > const &)" (__imp_??0CFindExclusions@@QAE@PAVCTreeHandler@@PAU_TREEITEM@@ABV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@@Z)
crosscorrelation.lib(CorrelationCross.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) const CTemplateHandleWithClsid::`vftable'" (__imp_??_7?$CTemplateHandleWithClsid@VCSingleVectorMap@@@@6B@) referenced in function "public: virtual void __thiscall CCrossCorrelation::Apply(class CDerivationData *,class CUIItemContext *,int)" (?Apply@CCrossCorrelation@@UAEXPAVCDerivationData@@PAVCUIItemContext@@H@Z)
crosscorrelation.lib(CorrelationViewerDlg.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) const CTemplateHandleWithClsid::`vftable'" (__imp_??_7?$CTemplateHandleWithClsid@VCSingleVectorMap@@@@6B@)
crosscorrelation.lib(CorrelationViewerDlg.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) const CTemplateHandle::`vftable'" (__imp_??_7?$CTemplateHandle@VCSingleVectorMap@@@@6B@) referenced in function "public: __thiscall CCorrelationViewerDlg::CCorrelationViewerDlg(class CWnd *)" (??0CCorrelationViewerDlg@@QAE@PAVCWnd@@@Z)
crosscorrelation.lib(CorrelationViewerDlg.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall CTemplateHandleWithClsid::CTemplateHandleWithClsid(class ATL::CStringT > > const &)" (__imp_??0?$CTemplateHandleWithClsid@VCSingleVectorMap@@@@QAE@ABV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@@Z) referenced in function "public: void __thiscall CCorrelationViewerDlg::OnDisplayMouseMove(class CMouseData *)" (?OnDisplayMouseMove@CCorrelationViewerDlg@@QAEXPAVCMouseData@@@Z)
.\Debug/CrossCorrelation.dll : fatal error LNK1120: 11 unresolved externals
Results
Code:
CrossCorrelation - 19 error(s), 4 warning(s)
Sample Class file related to the first linking error
Code:
#ifndef _INCLUDED_ITERATOR_
#define _INCLUDED_ITERATOR_

#ifndef __UtilitiesAfxExt_h__
#include "UtilitiesAfxExt.h"
#endif

#include <iterator>

template < class C >
class AFX_EXT_UTILITIES int_iterator : public std::iterator<std::random_access_iterator_tag,C>
{
    friend C;

    int            m_iIndex;

public:
    int_iterator() : m_iIndex( 0 ) {}
    int_iterator( int iIndex ) : m_iIndex ( iIndex ) {}
    int_iterator( const int_iterator& it ) : m_iIndex( it.m_iIndex ) {}
    int_iterator& operator=( const int_iterator& it ){ m_iIndex = it.m_iIndex; return *this; }



    int_iterator& operator++() { ++m_iIndex; return *this; }
    int_iterator& operator--() { --m_iIndex; return *this; }
    int_iterator operator++(int) { return int_iterator(m_iIndex++); }
    int_iterator operator--(int) { return int_iterator(m_iIndex--); }
    int_iterator operator+(const int_iterator &r) { return int_iterator(m_iIndex+r.m_iIndex); }
    int_iterator operator-(const int_iterator &r) { return int_iterator(m_iIndex-r.m_iIndex); }
    int_iterator& operator+=(distance_type offset) { m_iIndex+=offset; return *this; }
    int_iterator& operator-=(distance_type offset) { m_iIndex-=offset; return *this; }    
    bool operator!=( const int_iterator& rhs ) const { return m_iIndex != rhs.m_iIndex; }
    bool operator==( const int_iterator& rhs ) const { return m_iIndex == rhs.m_iIndex; }
    int operator*() const { return m_iIndex; }
};


#endif



thanks,
Hardik

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error linker (LNK2001)TrialRun.cpp KAZTYX BOOK: Beginning Visual C++ 6 3 March 5th, 2010 10:59 AM
reg conn to sql server 2005 from vb.net 2005.. veda SQL Server 2005 2 July 1st, 2008 12:16 AM
VC# 2005 Express Errors NOT being thrown dparsons C# 2005 1 May 9th, 2007 07:37 AM
error lnk2019 Paula222 Visual C++ 0 February 7th, 2006 06:03 PM
LNK2019 Error message - Visual C++ .net 2003 Gino Visual C++ 2 December 18th, 2005 10:06 AM



All times are GMT -4. The time now is 10:10 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.