473,757 Members | 10,708 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

errors LNK2001 and LNK2019 with VS .net 2005

2 New Member
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.

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
  1. Creating temporary file "c:\hardik\VidPIVSrc\VidPIV 3.0\CrossCorrelation\Debug\RSP0000183284168.rsp" with contents
  2. [
  3. /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"
  4. "..\CrossCorrelationLib\Debug\CrossCorrelationlib.lib"
  5. ".\Debug\CrossCorrelation.res"
  6. ".\Debug\CrossCorrelation.dll.embed.manifest.res"
  7. ]
  8. Creating command line "link.exe @"c:\hardik\VidPIVSrc\VidPIV 3.0\CrossCorrelation\Debug\RSP0000183284168.rsp" /NOLOGO /ERRORREPORT:PROMPT"
  9.  
  10. Output Window
  11. LNK4075: ignoring '/INCREMENTAL' due to '/FORCE' specification
  12. crosscorrelation.lib(CrossCorrelation.obj) : warning LNK4006: _VdpvDllInfo@4 already defined in vdpvtime.lib(VdpvTime.dll); second definition ignored
  13. crosscorrelation.lib(CrossCorrelation.obj) : warning LNK4006: _VdpvClassInfo@32 already defined in vdpvtime.lib(VdpvTime.dll); second definition ignored
  14. crosscorrelation.lib(CrossCorrelation.obj) : warning LNK4006: _DllMain@12 already defined in vdpvderivations.lib(VdpvDerivations.dll); second definition ignored
  15. 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)
  16. 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)
  17. 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)
  18. 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)
  19. 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)
  20. 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
  21. crosscorrelation.lib(CorrelationViewerDlg.obj) : error LNK2001: unresolved ...........some more errors 
  22.  : fatal error LNK1120: 11 unresolved externals
  23.  
  24. The sample class responsible for the first error.
  25.  
  26. #ifndef _INCLUDED_ITERATOR_
  27. #define _INCLUDED_ITERATOR_
  28.  
  29. #ifndef __UtilitiesAfxExt_h__
  30. #include "UtilitiesAfxExt.h"
  31. #endif
  32.  
  33. #include <iterator>
  34.  
  35. template < class C >
  36. class AFX_EXT_UTILITIES int_iterator : public std::iterator<std::random_access_iterator_tag,C>
  37. {
  38.     friend C;
  39.  
  40.     int            m_iIndex;
  41.  
  42. public:
  43.     int_iterator() : m_iIndex( 0 ) {}
  44.     int_iterator( int iIndex ) : m_iIndex ( iIndex ) {}
  45.     int_iterator( const int_iterator& it ) : m_iIndex( it.m_iIndex ) {}
  46.     int_iterator& operator=( const int_iterator& it ){ m_iIndex = it.m_iIndex; return *this; }
  47.  
  48.  
  49.  
  50.     int_iterator& operator++() { ++m_iIndex; return *this; }
  51.     int_iterator& operator--() { --m_iIndex; return *this; }
  52.     int_iterator operator++(int) { return int_iterator(m_iIndex++); }
  53.     int_iterator operator--(int) { return int_iterator(m_iIndex--); }
  54.     int_iterator operator+(const int_iterator &r) { return int_iterator(m_iIndex+r.m_iIndex); }
  55.     int_iterator operator-(const int_iterator &r) { return int_iterator(m_iIndex-r.m_iIndex); }
  56.     int_iterator& operator+=(distance_type offset) { m_iIndex+=offset; return *this; }
  57.     int_iterator& operator-=(distance_type offset) { m_iIndex-=offset; return *this; }    
  58.     bool operator!=( const int_iterator& rhs ) const { return m_iIndex != rhs.m_iIndex; }
  59.     bool operator==( const int_iterator& rhs ) const { return m_iIndex == rhs.m_iIndex; }
  60.     int operator*() const { return m_iIndex; }
  61. };
  62.  
  63.  
  64. #endif
  65.  
thanks,
Hardik
May 10 '06 #1
2 5283
Banfa
9,065 Recognized Expert Moderator Expert
LNK20019 and LNK2001. Giving error msg that some symbol is not found. Actually, the library with the symbol has been already compiled as dll.
In my experience you will just have to take the long route of wading through the erros trying to fix them.

However if you have already compiled the code that contains the unresolved symbols into a dll then a couple of possibilities are
  • You have not included the .lib from that DLL into the current link
  • You have not declared those functions as dllexport when you compiled/linked the original dll.
May 10 '06 #2
rangalo
2 New Member
Hi,
thanks for the reply.

I have already compiled the concerned code. I also export/import the functions. The code is compiling and working well with vc6.

the problems is how to fix this errors when we have properly exported and compiled functino ?
May 10 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1453
by: KS | last post by:
I am getting linker error for a code that was tested and running. I opened the project in VS.NET 2003 and now i get these errors - I am sure it is some options issue. Can anyone please help? Linking... atls.lib(atlbase.obj) : error LNK2001: unresolved external symbol ___security_cookie PenPacketInfoDlg.obj : error LNK2019: unresolved external
3
7367
by: Leith Bade | last post by:
I have been trying to use the new Visual C++ Toolkit 2003 with the VC6 IDE I set up the executable, inlcude, and library directories to point to the new compilers I had to fix a few errors in the MFC6 <afxtempl.h> to get it to compile with the better standards confomance (mainly omitted typename, and lazyness with specialized templates - using BASE_CLASS & TYPE instead of CObList & CObList*) Now I get some strange linker errors, and I don't...
3
8081
by: Chucker | last post by:
Hi Folks, I got a Wrapper Dll around a native C++ static library. In .NET 1.1 this worked fine. When moving to .NET 2.0 I get a couple of unresolved externals / linker errors: Error 16 error LNK2028: unresolved token (0A000007) "extern "C" void __clrcall ___CxxCallUnwindDtor(void (__clrcall*)(void *),void *)" (?___CxxCallUnwindDtor@@$$J0YMXP6MXPAX@Z0@Z) referenced in function "public: virtual __thiscall...
0
4887
by: Adam Clauss | last post by:
I have managed C++ library (is bridging between a Win32 .dll and a C# application). All was well when compiled under VS2003, but I am running into a series of linking errors when compiling against VS2005. They all/mostly seem to be within the STL. Any idea what might cause something like this? Linking errors follow. ---
0
2557
by: Philip Lowman | last post by:
I am in the process of trying to migrate a couple of build solutions to Visual Studio Express 2005 from VS 2003 Professional and I am running into a weird C/C++ runtime library linking issue when using the /MT compilation option. Our debug solution's /MTd flag works fine and using /MD also seems to work ok. For some reason I can't fathom, when I use /MT, linking the static excutable completely dies (problems resolving symbols in the STL,...
1
10358
by: iiitsunny | last post by:
i have ported one project which was working in VC6 to VC7. Now the project is working fine in VC7 also. I have made some additions in VC7 environment only. But the problem is that the project is not working in the release mode. I mean it is shooting off linking errors. I am required to generate an exe file and am looking for some suggestions!!! thank you all Linker Errors are something like this... error LNK2001: unresolved external...
4
5273
by: Franky | last post by:
I have a cpp program that use to compile in C++6 but give a bunch of errors in VS2005 I'm wondering if I need to reference to some library. I'd appreciate any helpful suggestion Even if it's just a suggestion of where to look or something that might work.
2
12310
by: 2b|!2b==? | last post by:
I am having linkage errors in my release build as ff: ------ Build started: Project: myModule, Configuration: Release Win32 ------ Linking... Creating library c:\mypath\myModule.lib and object c:\mypath\myModule.exp Class1.obj : error LNK2001: unresolved external symbol __imp___CrtDbgReportW Class2.obj : error LNK2001: unresolved external symbol __imp___CrtDbgReportW Class3.obj : error LNK2019: unresolved external symbol...
4
6663
by: Duncan Smith | last post by:
I have a VS2005 C++ MFC project which #imports a type library. The goal is to introduce some managed code eventually, but for starters I just need to set the /clr compiler option and build the project. The type library is imported like so: #import <LtipClient.tlbno_namespace named_guids With the /clr switch on, I got lots of LNK2028 errors, so I added the following directive to the top of each cpp source file
0
9489
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10072
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9906
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9737
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8737
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7286
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5172
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
3399
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2698
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.