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.
here 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
Expand|Select|Wrap|Line Numbers
- 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
- 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 ...........some more errors
- : fatal error LNK1120: 11 unresolved externals
- The sample class responsible for the first error.
- #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
Hardik