473,385 Members | 1,693 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.

Link error LNK2020 in VC7.1

I have a very simple program with some computations.
After using NODEFAULTLIB to get rid of LNK2005 errors such as:
LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already defined in
msvcrtd.lib(MSVCR71D.dll)

Now I have two new LNK2020 errors:
LINK : error LNK2020: unresolved token (0A000021) std._Lockit.__dtor
LINK : error LNK2020: unresolved token (0A000022) _DebugHeapTag
LINK : fatal error LNK1120: 2 unresolved externals

I am not sure which LIB I need to include. The command line has

/NOLOGO /NODEFAULTLIB /DEBUG /ASSEMBLYDEBUG
/MAP /MAPINFO:EXPORTS /MACHINE:X86 /FIXED:No msvcrtd.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

Any suggestions? Thanks!

Vickie
--
meakanu
Nov 17 '05 #1
2 1673
Sounds like the project has the mutithreaded debug runtime set and you added
msvcrtd.lib by hand too.
Nov 17 '05 #2


"Gabest" wrote:
Sounds like the project has the mutithreaded debug runtime set and you added
msvcrtd.lib by hand too.

Hello "Gabest",

Thank you for your suggestion. I checked the project property settings and
I have -
Runtime Library of C++ Code Generation set at Single Thread(/ML).
Are there some other tabs that might have been set to "mutithreaded debug
runtime"?
I am enclosing more command lines and hopefully that give some clue.

Creating temporary file "d:\Transmodel\Debug\RSP00004B.rsp" with contents
[
/Od /AI "system.dll" /AI "mscorlib.dll" /AI "D:\Transmodel\Debug" /D "WIN32"
/D "_DEBUG" /D "_MBCS" /FD /EHsc /Yu"stdafx.h" /Fp"Debug/Transmodel.pch" /Fx
/Fo"Debug/" /Fd"Debug/vc70.pdb" /W3 /c /Zi /clr /TP /showIncludes /FU
"C:\WINNT\Microsoft.NET\Framework\v1.1.4322\mscorl ib.dll"
/FU "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\System .dll"
/FU "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\System .Data.dll"
".\Transmodel.cpp"
".\AssemblyInfo.cpp"
]
Creating command line "cl.exe @"d:\Transmodel\Debug\RSP00004B.rsp" /nologo"
Creating temporary file "d:\Transmodel\Debug\RSP00004C.rsp" with contents
[
/Od /AI "system.dll" /AI "mscorlib.dll" /AI "D:\Transmodel\Debug" /D "WIN32"
/D "_DEBUG" /D "_MBCS" /FD /EHsc /Yc"stdafx.h" /Fp"Debug/Transmodel.pch" /Fx
/Fo"Debug/" /Fd"Debug/vc70.pdb" /W3 /c /Zi /clr /TP /showIncludes /FU
"C:\WINNT\Microsoft.NET\Framework\v1.1.4322\mscorl ib.dll"
/FU "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\System .dll"
/FU "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\System .Data.dll"
".\stdafx.cpp"
]
Creating command line "cl.exe @"d:\Transmodel\Debug\RSP00004C.rsp" /nologo"
Creating temporary file "d:\Transmodel\Debug\RSP00004D.rsp" with contents
[
/OUT:"D:\Transmodel\Debug\Transmodel.exe" /INCREMENTAL:NO /NOLOGO
/NODEFAULTLIB /DEBUG /ASSEMBLYDEBUG /PDB:"D:\Transmodel\Debug/Transmodel.pdb"
/MAP /MAPINFO:EXPORTS /MACHINE:X86 /FIXED:No msvcrtd.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
".\Debug\AssemblyInfo.obj"
".\Debug\stdafx.obj"
".\Debug\Transmodel.obj"
".\Debug\app.res"

Thank you for your help!

Vickie
Nov 17 '05 #3

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

Similar topics

1
by: Peter | last post by:
Hi, I got the following link error in my release build (I am using vc7 on WinXP): ----------------------------------------- Linking... LINK : error LNK2020: unresolved token (0A000020)...
0
by: demofo | last post by:
once I added the following directive #include <string? It produce the following linking errors CClassLib error LNK2020: unresolved token (0A000015) _CxxThrowException CClassLib error LNK2020:...
4
by: Scott | last post by:
We are trying to build a managed C++ static link library containing several classes which are members of a namespace. The build of this library seems to work OK. No errors. We then try to use...
2
by: Eric Twietmeyer | last post by:
Hello, I am running into something very strange. I am writing a .NET assembly using managed c++ (VS.NET 2003) and in this project when I attempt to make a call to sscanf (from stdio.h) I get...
10
by: Ian Lazarus | last post by:
Hello. How do "unresolved token" link errors occur. How do I fix them? Linking... LINK : error LNK2020: unresolved token (0A000015) ??_7type_info@@6B@ LINK : error LNK2020: unresolved token...
4
by: Jun | last post by:
anyone know how this error shows? how can i solve this? LINK : error LNK2020: unresolved token (0A0000EA) _AtlBaseModule LINK : error LNK2020: unresolved token (0A0000EC) atlTraceGeneral LINK :...
0
by: crafuse | last post by:
Hello all, I'm trying to create a mixed DLL using VC++ .NET 2003. Specifically, I have some TAO CORBA .cpp files that I wish to include as native object code in the DLL and some managed classes...
0
by: Roland | last post by:
Hi, ultimately I want to call some unmanaged C++ class that contains some DirectShow code of mine from my C# classes, but for the time being I'd be happy if I could get this to build! I have...
4
by: Ray Tayek | last post by:
hi, i am teaching a class using visual studio 2003 in the labs at school and trying to get some pure c++ into a dll so i can sic nunit on it. trying to put the code below into a .net class library...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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: 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
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,...
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.