?
Solved

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

Posted on 2004-08-19
11
Medium Priority
?
867 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
Suggested Courses

762 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