Click here to Skip to main content
16,004,969 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: windows task manager Pin
Naveen9-May-06 23:54
Naveen9-May-06 23:54 
GeneralNo Subject Pin
Maxwell Chen9-May-06 23:57
Maxwell Chen9-May-06 23:57 
GeneralRe: windows task manager Pin
Cedric Moonen10-May-06 0:01
Cedric Moonen10-May-06 0:01 
GeneralRe: windows task manager Pin
Maxwell Chen10-May-06 0:03
Maxwell Chen10-May-06 0:03 
GeneralRe: windows task manager Pin
Nibu babu thomas10-May-06 0:00
Nibu babu thomas10-May-06 0:00 
GeneralRe: windows task manager Pin
Maxwell Chen10-May-06 0:09
Maxwell Chen10-May-06 0:09 
AnswerRe: Closing existing document in MDI on OnFIleOpen Pin
Nibu babu thomas9-May-06 22:50
Nibu babu thomas9-May-06 22:50 
Questionerrors LNK2001 and LNK2019 with VS .net 2005 Pin
hellow_world_cpp9-May-06 22:42
hellow_world_cpp9-May-06 22:42 
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

Creating temporary file "c:\hardik\VidPIVSrc\VidPIV 3.0\CrossCorrelation\Debug\RSP0000183284168.rsp" with contents<br />
[<br />
/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"<br />
<br />
"..\CrossCorrelationLib\Debug\CrossCorrelationlib.lib"<br />
<br />
".\Debug\CrossCorrelation.res"<br />
<br />
".\Debug\CrossCorrelation.dll.embed.manifest.res"<br />
]<br />
Creating command line "link.exe @"c:\hardik\VidPIVSrc\VidPIV 3.0\CrossCorrelation\Debug\RSP0000183284168.rsp" /NOLOGO /ERRORREPORT:PROMPT"<br />


Output Window
Linking...<br />
LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/FORCE' specification<br />
crosscorrelation.lib(CrossCorrelation.obj) : warning LNK4006: _VdpvDllInfo@4 already defined in vdpvtime.lib(VdpvTime.dll); second definition ignored<br />
crosscorrelation.lib(CrossCorrelation.obj) : warning LNK4006: _VdpvClassInfo@32 already defined in vdpvtime.lib(VdpvTime.dll); second definition ignored<br />
crosscorrelation.lib(CrossCorrelation.obj) : warning LNK4006: _DllMain@12 already defined in vdpvderivations.lib(VdpvDerivations.dll); second definition ignored<br />
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)<br />
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)<br />
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)<br />
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)<br />
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)<br />
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<br />
crosscorrelation.lib(CorrelationViewerDlg.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall CTemplateHandleWithClsid::~CTemplateHandleWithClsid(void)" (__imp_??1?$CTemplateHandleWithClsid@VCSingleVectorMap@@@@UAE@XZ)<br />
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)<br />
crosscorrelation.lib(FindBestPulseSeperationDlg.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall CFindExclusions::~CFindExclusions(void)" (__imp_??1CFindExclusions@@UAE@XZ)<br />
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)<br />
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)<br />
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)<br />
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)<br />
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)<br />
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)<br />
crosscorrelation.lib(CorrelationViewerDlg.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) const CTemplateHandleWithClsid::`vftable'" (__imp_??_7?$CTemplateHandleWithClsid@VCSingleVectorMap@@@@6B@)<br />
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)<br />
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)<br />
.\Debug/CrossCorrelation.dll : fatal error LNK1120: 11 unresolved externals


Sample Class file related to the first linking error

#ifndef _INCLUDED_ITERATOR_<br />
#define _INCLUDED_ITERATOR_<br />
<br />
#ifndef __UtilitiesAfxExt_h__<br />
#include "UtilitiesAfxExt.h"<br />
#endif<br />
<br />
#include <iterator><br />
<br />
template < class C ><br />
class AFX_EXT_UTILITIES int_iterator : public std::iterator<std::random_access_iterator_tag,C><br />
{<br />
	friend C;<br />
<br />
	int			m_iIndex;<br />
<br />
public:<br />
	int_iterator() : m_iIndex( 0 ) {}<br />
	int_iterator( int iIndex ) : m_iIndex ( iIndex ) {}<br />
	int_iterator( const int_iterator& it ) : m_iIndex( it.m_iIndex ) {}<br />
	int_iterator& operator=( const int_iterator& it ){ m_iIndex = it.m_iIndex; return *this; }<br />
<br />
	<br />
<br />
	int_iterator& operator++() { ++m_iIndex; return *this; }<br />
	int_iterator& operator--() { --m_iIndex; return *this; }<br />
	int_iterator operator++(int) { return int_iterator(m_iIndex++); }<br />
	int_iterator operator--(int) { return int_iterator(m_iIndex--); }<br />
	int_iterator operator+(const int_iterator &r) { return int_iterator(m_iIndex+r.m_iIndex); }<br />
	int_iterator operator-(const int_iterator &r) { return int_iterator(m_iIndex-r.m_iIndex); }<br />
	int_iterator& operator+=(distance_type offset) { m_iIndex+=offset; return *this; }<br />
	int_iterator& operator-=(distance_type offset) { m_iIndex-=offset; return *this; }	<br />
	bool operator!=( const int_iterator& rhs ) const { return m_iIndex != rhs.m_iIndex; }<br />
	bool operator==( const int_iterator& rhs ) const { return m_iIndex == rhs.m_iIndex; }<br />
	int operator*() const { return m_iIndex; }<br />
};<br />
<br />
<br />
#endif<br />
<br />

QuestionNeed help Pin
subramanyeswari9-May-06 22:42
subramanyeswari9-May-06 22:42 
AnswerRe: Need help Pin
_AnsHUMAN_ 9-May-06 23:00
_AnsHUMAN_ 9-May-06 23:00 
GeneralRe: Need help Pin
subramanyeswari9-May-06 23:08
subramanyeswari9-May-06 23:08 
AnswerRe: Need help Pin
Magnus Westin9-May-06 23:43
Magnus Westin9-May-06 23:43 
QuestionHtmlHelp Error in Visual Studio Pin
LittleYellowBird9-May-06 21:50
LittleYellowBird9-May-06 21:50 
AnswerRe: HtmlHelp Error in Visual Studio Pin
Nibu babu thomas9-May-06 22:02
Nibu babu thomas9-May-06 22:02 
GeneralRe: HtmlHelp Error in Visual Studio Pin
LittleYellowBird9-May-06 22:15
LittleYellowBird9-May-06 22:15 
GeneralRe: HtmlHelp Error in Visual Studio Pin
Hamid_RT9-May-06 22:22
Hamid_RT9-May-06 22:22 
GeneralRe: HtmlHelp Error in Visual Studio Pin
LittleYellowBird9-May-06 22:42
LittleYellowBird9-May-06 22:42 
GeneralRe: HtmlHelp Error in Visual Studio Pin
Hamid_RT9-May-06 23:52
Hamid_RT9-May-06 23:52 
GeneralRe: HtmlHelp Error in Visual Studio Pin
LittleYellowBird10-May-06 1:10
LittleYellowBird10-May-06 1:10 
Questiondelegate client Pin
Girish6019-May-06 21:45
Girish6019-May-06 21:45 
QuestionCan I serialize COleDateTime object? Pin
NoName II9-May-06 21:31
NoName II9-May-06 21:31 
AnswerRe: Can I serialize COleDateTime object? Pin
Nibu babu thomas9-May-06 21:58
Nibu babu thomas9-May-06 21:58 
GeneralRe: Can I serialize COleDateTime object? Pin
NoName II9-May-06 22:14
NoName II9-May-06 22:14 
GeneralRe: Can I serialize COleDateTime object? Pin
Nibu babu thomas9-May-06 22:16
Nibu babu thomas9-May-06 22:16 
GeneralRe: Can I serialize COleDateTime object? Pin
NoName II9-May-06 22:50
NoName II9-May-06 22:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.