PRB: LNK2001: Unresolved External Symbol __chkesp

ID: Q191669


The information in this article applies to:
  • The C Run-Time (CRT), included with:
    • Microsoft Visual C++, 32-bit Editions, version 6.0


SYMPTOMS

When building a project with Visual C++ 6.0, you may get the following linker error:

error LNK2001: unresolved external symbol __chkesp


CAUSE

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


RESOLUTION

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


STATUS

This behavior is by design.


MORE INFORMATION

Steps to Reproduce Behavior

Sample Code


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

Keywords : kbCompiler kbCRT kbVC600
Version : WINNT:6.0
Platform : winnt
Issue type : kbprb


Last Reviewed: July 20, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.