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 -
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
-
thanks,
Hardik
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.
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 ?
Sign in to post your reply or Sign up for a free account.
Similar topics |
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
|
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...
|
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...
|
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.
---
|
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,...
| |
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...
|
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.
|
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...
|
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
|
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...
|
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...
| |
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...
|
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...
|
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...
|
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...
|
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...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |