Microsoft KB Archive/191669

= 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

Article Last Modified on 10/3/2005

-

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++ 6.0 Standard Edition 

-

<div class="notice_section">

This article was previously published under Q191669

<div class="symptoms_section">

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

error LNK2001: unresolved external symbol __chkesp

<div class="cause_section">

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

<div class="resolution_section">

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

<div class="status_section">

STATUS
This behavior is by design.

<div class="moreinformation_section">

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

Keywords: kberrmsg kbtshoot kbprb kbcompiler KB191669

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.