Help and Support
 

powered byLive Search

You may receive an "error LNK2001 unresolved external symbol __chkesp" error message when you build a project with Visual C++ 6.0

Article ID:191669
Last Review:October 3, 2005
Revision:3.1
This article was previously published under Q191669
On This Page

SYMPTOMS

When building a project with Visual C++ 6.0, you may get the following linker error:
error LNK2001: unresolved external symbol __chkesp

Back to the top

CAUSE

The new compiler stack-checking feature requires you to link with the C run-time library.

Back to the top

RESOLUTION

Either link with one of the C run-time libraries or disable the compiler stack-checking feature (remove /GZ from the compiler switches).

Back to the top

STATUS

This behavior is by design.

Back to the top

MORE INFORMATION

Steps to reproduce the behavior

Sample code

   // test.cpp
   // compile with: cl /GZ test.cpp /link /nod
   void f() {}
   int main ()
   {
      f();
      return 0;
   }
				

Back to the top


APPLIES TO
The C Run-Time (CRT), when used with:
  Microsoft Visual C++ 6.0 Enterprise Edition
  Microsoft Visual C++ 6.0 Professional Edition
  Microsoft Visual C++, 32-bit Learning Edition 6.0

Back to the top

Keywords: 
kbtshoot kberrmsg kbcompiler kbprb KB191669

Back to the top

Article Translations

 

Other Support Options

  • Need More Help?
    Contact a Support professional by Email, Online or Phone.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.