Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

3 Linking errors i don't know what library i need = unresolved externals

Posted on 2004-08-19
11
Medium Priority
?
875 Views
Last Modified: 2007-12-19
hello i have 3 errors with linking i don't know what library i need so anyone can tell me what i need

my library list : kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

Linking Problem

Linking...
lib.obj : error LNK2001: unresolved external symbol __chvalidator
mass.obj : error LNK2001: unresolved external symbol __chvalidator
Debug/hello.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

hello.exe - 3 error(s), 0 warning(s)


0
Comment
Question by:Hanble
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2
11 Comments
 
LVL 5

Expert Comment

by:millsoft
ID: 11843879
Hi Hanble,

isctype.h in the CRT source for .NET has this:


/***
* __chvalidator
*
* Purpose:
*       This function is called by character testing functions in debug
*       versions. This function test for validation of c as character.
*       For improvement in performance, it is not used in non-debug
*       version.  It is available in the static single-thread non-debug
*       build, though, just in case C code that includes ctype.h is compiled
*       /D_DEBUG /ML.
*
*******************************************************************************/

Are you compiling release or debug?

Cheers!
Brad
0
 
LVL 86

Expert Comment

by:jkr
ID: 11844321
I am missing libcpd.lib and libcd.lib in the above list...
0
 
LVL 39

Expert Comment

by:itsmeandnobodyelse
ID: 11844735
>> I am missing libcpd.lib and libcd.lib in the above list...

The include file afx.h contains a sequence

#ifndef _AFX_NOFORCE_LIBS

...  include some windows and mfc libs

#ifdef _DLL
     #if !defined(_AFX_NO_DEBUG_CRT) && defined(_DEBUG)
          #pragma comment(lib, "msvcrtd.lib")
     #else
          #pragma comment(lib, "msvcrt.lib")
     #endif
#else
#ifdef _MT
     #if !defined(_AFX_NO_DEBUG_CRT) && defined(_DEBUG)
          #pragma comment(lib, "libcmtd.lib")
     #else
          #pragma comment(lib, "libcmt.lib")
     #endif
#else
     #if !defined(_AFX_NO_DEBUG_CRT) && defined(_DEBUG)
          #pragma comment(lib, "libcd.lib")
     #else
          #pragma comment(lib, "libc.lib")
     #endif
#endif
#endif


So, in case of MFC these libraries got linked by #pragma comment.


Hanble,

are you using precompiled header files?


Regards, Alex






0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 86

Accepted Solution

by:
jkr earned 172 total points
ID: 11844771
>>The include file afx.h contains a sequence

... in which libcpd.lib still is missing.
0
 
LVL 39

Assisted Solution

by:itsmeandnobodyelse
itsmeandnobodyelse earned 164 total points
ID: 11844847
>> ... in which libcpd.lib still is missing.

It's the "C++ Debug Runtime Library". Didn't see it recently.

Could be obsolete because of msvcrt.lib??? Or because of STL resp. C++ Standard ???

Regards, Alex
0
 

Author Comment

by:Hanble
ID: 11851397
are you using precompiled header files?
no i don't use percompiled header


i don't know what can i do with this problem anyway!


Are you compiling release or debug?
debug
0
 
LVL 5

Assisted Solution

by:millsoft
millsoft earned 164 total points
ID: 11852523
Try changing your run-time library options to static-linked/single-thread. Then try dynamic-link/single-thread, then Static-Link/Multiple-thread, etc. to see if perhaps a different version of the CRT will make a difference.
0
 

Expert Comment

by:jac_goudsmit
ID: 23920482
For me the way to fix it was to change the runtime library options to Multithreaded and Debug Multithreaded instead of Single-Threaded and Debug SIngle-Threaded.

Setting the runtime libraries to the DLL option (i.e. using MSVCRT.DLL) also works.

(Visual Studio 6 with the Platform SDK Feb 2003 and DDK for Windows Server 2003 SP1 installed)

===Jac
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question