473,385 Members | 1,769 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Unresolved 'C' functions in linking.

I am trying to use managed C++ but I am getting the
following link errors:

Metadata
file 'D:\Projects\Visa\AddressVerification\AddressVerif icat
ionTest\bin\Debug\AddressVerificationInterface.dll ' could
not be found
AddressVerificationInterface error LNK2001: unresolved
external symbol "void * __cdecl operator new(unsigned
int)" (??2@$$FYAPAXI@Z)
AddressVerificationInterface error LNK2001: unresolved
external symbol "void __cdecl operator delete(void *)" (??
3@$$FYAXPAX@Z)
AddressVerificationInterface error LNK2001: unresolved
external symbol "char * __cdecl strncpy(char *,char const
*,unsigned int)" (?strncpy@@$$J0YAPADPADPBDI@Z)
AddressVerificationInterface error LNK2001: unresolved
external symbol "void * __cdecl memset(void *,int,unsigned
int)" (?memset@@$$J0YAPAXPAXHI@Z)
AddressVerificationInterface fatal error LNK1120: 4
unresolved externals
These all seem like 'C' functions that should be part of
the CRT. How do I resolve these? Does C++ not know the
difference between a managed new and an unmanaged new?
What about strncpy? and memset?

Thank you.

Kevin
Nov 16 '05 #1
3 3501

--------------------
From: "Kevin Burton" <rk******************@charter.net>
Subject: Unresolved 'C' functions in linking.
Date: Wed, 6 Aug 2003 13:52:35 -0700
Message-ID: <03****************************@phx.gbl>

I am trying to use managed C++ but I am getting the
following link errors:

Metadata
file 'D:\Projects\Visa\AddressVerification\AddressVerif icat
ionTest\bin\Debug\AddressVerificationInterface.dl l' could
not be found
AddressVerificationInterface error LNK2001: unresolved
external symbol "void * __cdecl operator new(unsigned
int)" (??2@$$FYAPAXI@Z)
AddressVerificationInterface error LNK2001: unresolved
external symbol "void __cdecl operator delete(void *)" (??
3@$$FYAXPAX@Z)
AddressVerificationInterface error LNK2001: unresolved
external symbol "char * __cdecl strncpy(char *,char const
*,unsigned int)" (?strncpy@@$$J0YAPADPADPBDI@Z)
AddressVerificationInterface error LNK2001: unresolved
external symbol "void * __cdecl memset(void *,int,unsigned
int)" (?memset@@$$J0YAPAXPAXHI@Z)
AddressVerificationInterface fatal error LNK1120: 4
unresolved externals
These all seem like 'C' functions that should be part of
the CRT. How do I resolve these? Does C++ not know the
difference between a managed new and an unmanaged new?
What about strncpy? and memset?

Thank you.

Kevin


There could be a number of things going on here, and just the error message
isn't enough to figure it out in this case. What options are being passed
to the linker? Is /nodefaultlib one of them? That could be the cause of the
unresolved externals. As for the first error, it sounds like the location
of the DLL is not on the assembly search path. Try adding /AI<location of
assembly> to the command line.

Please send your compile and link command line options, and I might be able
to help further.

--
Daniel Tomko, Visual C++ Team
This posting is provided AS IS with no warranties, and confers no rights.

Nov 16 '05 #2
Thank you for your response:

Here is my compile:

/Od /I "C:\Program
Files\PB\Finalist\Include" /AI "d:\Projects\Visa\AddressVer
ification\AddressVerificationInterface\Debug" /D "WIN32" /D
"_DEBUG" /D "_WINDLL" /D "_MBCS" /FD /EHsc /MTd /GS /Yu"st
dafx.h" /Fp"d:\Projects\Visa\AddressVerification\AddressV er
ificationInterface\Debug/AddressVerificationInterface.pch"
/Fo"d:\Projects\Visa\AddressVerification\AddressVer ificatio
nInterface\Debug/" /Fd"d:\Projects\Visa\AddressVerification
\AddressVerificationInterface\Debug/vc70.pdb" /W3 /nologo /
c /Zi /clr /TP /FU "C:\WINNT\Microsoft.NET\Framework\v1.1.4
322
\mscorlib.dll" /FU "C:\WINNT\Microsoft.NET\Framework\v1.1.4
322
\System.dll" /FU "C:\WINNT\Microsoft.NET\Framework\v1.1.432
2\System.XML.dll"

Here is the link:

/OUT:"d:\Projects\Visa\AddressVerification\AddressV erificat
ionInterface\Debug/AddressVerificationInterface.dll" /INCRE
MENTAL /NOLOGO /LIBPATH:"C:\Program
Files\PB\Finalist\LIB\\" /DLL /DEBUG /ASSEMBLYDEBUG /PDB:"d
:\Projects\Visa\AddressVerification\AddressVerific ationInte
rface\Debug/AddressVerificationInterface.pdb" /FIXED:No
nochkclr.obj mscoree.lib pclnt.lib kernel32.lib
user32.lib gdi32.lib winspool.lib comdlg32.lib
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
odbc32.lib odbccp32.lib

Kevin
-----Original Message-----

--------------------
From: "Kevin Burton" <rk******************@charter.net>
Subject: Unresolved 'C' functions in linking.
Date: Wed, 6 Aug 2003 13:52:35 -0700
Message-ID: <03****************************@phx.gbl>

I am trying to use managed C++ but I am getting the
following link errors:

Metadata
file 'D:\Projects\Visa\AddressVerification\AddressVerif ic ationTest\bin\Debug\AddressVerificationInterface.d ll' couldnot be found
AddressVerificationInterface error LNK2001: unresolved
external symbol "void * __cdecl operator new(unsigned
int)" (??2@$$FYAPAXI@Z)
AddressVerificationInterface error LNK2001: unresolved
external symbol "void __cdecl operator delete(void *)" (??3@$$FYAXPAX@Z)
AddressVerificationInterface error LNK2001: unresolved
external symbol "char * __cdecl strncpy(char *,char const*,unsigned int)" (?strncpy@@$$J0YAPADPADPBDI@Z)
AddressVerificationInterface error LNK2001: unresolved
external symbol "void * __cdecl memset(void *,int,unsignedint)" (?memset@@$$J0YAPAXPAXHI@Z)
AddressVerificationInterface fatal error LNK1120: 4
unresolved externals
These all seem like 'C' functions that should be part of
the CRT. How do I resolve these? Does C++ not know the
difference between a managed new and an unmanaged new?
What about strncpy? and memset?

Thank you.

Kevin

There could be a number of things going on here, and just

the error messageisn't enough to figure it out in this case. What options are being passedto the linker? Is /nodefaultlib one of them? That could be the cause of theunresolved externals. As for the first error, it sounds like the locationof the DLL is not on the assembly search path. Try adding /AI<location ofassembly> to the command line.

Please send your compile and link command line options, and I might be ableto help further.

--
Daniel Tomko, Visual C++ Team
This posting is provided AS IS with no warranties, and confers no rights.
.

Nov 16 '05 #3

--------------------
From: "Kevin Burton" <rk******************@charter.net>
Sender: "Kevin Burton" <rk******************@charter.net>
Subject: RE: Unresolved 'C' functions in linking.
Date: Fri, 8 Aug 2003 08:35:10 -0700
Message-ID: <01****************************@phx.gbl>

Thank you for your response:

Here is my compile:

/Od /I "C:\Program
Files\PB\Finalist\Include" /AI "d:\Projects\Visa\AddressVer
ification\AddressVerificationInterface\Debug" /D "WIN32" /D
"_DEBUG" /D "_WINDLL" /D "_MBCS" /FD /EHsc /MTd /GS /Yu"st
dafx.h" /Fp"d:\Projects\Visa\AddressVerification\AddressV er
ificationInterface\Debug/AddressVerificationInterface.pch"
/Fo"d:\Projects\Visa\AddressVerification\AddressVer ificatio
nInterface\Debug/" /Fd"d:\Projects\Visa\AddressVerification
\AddressVerificationInterface\Debug/vc70.pdb" /W3 /nologo /
c /Zi /clr /TP /FU "C:\WINNT\Microsoft.NET\Framework\v1.1.4
322
\mscorlib.dll" /FU "C:\WINNT\Microsoft.NET\Framework\v1.1.4
322
\System.dll" /FU "C:\WINNT\Microsoft.NET\Framework\v1.1.432
2\System.XML.dll"

Here is the link:

/OUT:"d:\Projects\Visa\AddressVerification\AddressV erificat
ionInterface\Debug/AddressVerificationInterface.dll" /INCRE
MENTAL /NOLOGO /LIBPATH:"C:\Program
Files\PB\Finalist\LIB\\" /DLL /DEBUG /ASSEMBLYDEBUG /PDB:"d
:\Projects\Visa\AddressVerification\AddressVerifi cationInte
rface\Debug/AddressVerificationInterface.pdb" /FIXED:No
nochkclr.obj mscoree.lib pclnt.lib kernel32.lib
user32.lib gdi32.lib winspool.lib comdlg32.lib
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
odbc32.lib odbccp32.lib

Kevin
-----Original Message-----

--------------------
From: "Kevin Burton" <rk******************@charter.net>
Subject: Unresolved 'C' functions in linking.
Date: Wed, 6 Aug 2003 13:52:35 -0700
Message-ID: <03****************************@phx.gbl>

I am trying to use managed C++ but I am getting the
following link errors:

Metadata
file 'D:\Projects\Visa\AddressVerification\AddressVerif icationTest\bin\Debug\AddressVerificationInterface. dll'couldnot be found
AddressVerificationInterface error LNK2001: unresolved
external symbol "void * __cdecl operator new(unsigned
int)" (??2@$$FYAPAXI@Z)
AddressVerificationInterface error LNK2001: unresolved
external symbol "void __cdecl operator delete(void *)"(??3@$$FYAXPAX@Z)
AddressVerificationInterface error LNK2001: unresolved
external symbol "char * __cdecl strncpy(char *,charconst*,unsigned int)" (?strncpy@@$$J0YAPADPADPBDI@Z)
AddressVerificationInterface error LNK2001: unresolved
external symbol "void * __cdecl memset(void*,int,unsignedint)" (?memset@@$$J0YAPAXPAXHI@Z)
AddressVerificationInterface fatal error LNK1120: 4
unresolved externals
These all seem like 'C' functions that should be part of
the CRT. How do I resolve these? Does C++ not know the
difference between a managed new and an unmanaged new?
What about strncpy? and memset?

Thank you.

Kevin


There could be a number of things going on here, and just

the error message
isn't enough to figure it out in this case. What options

are being passed
to the linker? Is /nodefaultlib one of them? That could

be the cause of the
unresolved externals. As for the first error, it sounds

like the location
of the DLL is not on the assembly search path. Try

adding /AI<location of
assembly> to the command line.

Please send your compile and link command line options,

and I might be able
to help further.

--
Daniel Tomko, Visual C++ Team
This posting is provided AS IS with no warranties, and

confers no rights.

.


Yuck. I'm still not seeing anything obvious. Is it neceessary that you use
precompiled headers? If not, you may want to remove them and compile
normally. In general, it just reduces complication. It looks like the first
error is trying to do a metadata search on the DLL you are creating. Why is
this? I don't see that DLL listed anywhere on the linker line other than
the /OUT argument. Is the source code for the DLL self referencing in a
using statement? As for the CRT symbols, try adding msvcrt.lib to the
linker command line.

Sorry about not being of much help, but I'm grasping at straws... I haven't
been able to reproduce this on my end, so I'm just going on what I see here.

--
Daniel Tomko, Visual C++ Team
This posting is provided AS IS with no warranties, and confers no rights.

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: We need more power captain | last post by:
Hi, I know less than a noob, I've been asked to do some compiles in VC++ 6 without knowing too much at all. (I'm a COBOL program normally so this is all too much for me) I open VC++6, open...
2
by: Freddy | last post by:
I am not an experienced programmer, but I had a VC++ program I am trying to eliminate all the VC++ commands from it...and keeping it as a normal C/C++ program......I guess I have succeeded so far,...
2
by: ozgan.net | last post by:
Hi everyone, I created my first COM object, but I took below errors. Why I didn't use socket functions. I defined *.def file __imp__WSAStartup@8 PRIVATE __imp__socket@12 PRIVATE...
2
by: Ian Taite | last post by:
Help, I am trying to nail a linking problem, to avoid having to lose about 2 weeks work. I have a backup of my project that compiles and links OK however changes I made sometime since then have...
5
by: pat270881 | last post by:
hello, I use the Visual C++ 2005 Express Edition and I want to implement a simple c++ programm which has a header file and a implementation file. the header file: #include <iostream>
2
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent: Monday, December 4, 2006 10:03:28 PM Subject: Re: ...
2
by: Maydogg6 | last post by:
I need a hand with some stubborn link errors. I'm trying to recreate and old program from 6.0 into .NET, but for some reason when I try to compile I'm getting linking errors for all my function...
0
by: dotyet | last post by:
Hi Everyone, I am trying to build a DB2 UDB UDF which can perform regex over the table data. The user defined function will call an external .dll file to do the task. I am referring to the...
3
by: curious2007 | last post by:
I am getting the following type of error: 1>Compiling manifest to resources... 1>Linking... 1>main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...

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.