Microsoft KB Archive/814701

= &quot;C1083&quot; error message when you try to compile a Win32 application that includes static library files =

Article ID: 814701

Article Last Modified on 2/3/2006

-

APPLIES TO


 * Microsoft Visual Studio .NET 2002 Professional Edition
 * Microsoft Visual Studio .NET 2002 Enterprise Architect
 * Microsoft Visual Studio .NET 2002 Enterprise Developer
 * Microsoft Visual Studio .NET 2002 Academic Edition

-



SYMPTOMS
Assume that you have Microsoft Visual C++ .NET installed, either as a stand-alone installation, or as part of Microsoft Visual Studio .NET. When you try to compile a Microsoft Win32 application that includes static library files, you may receive the following error message:

Fatal error C1083: Cannot open include file: 'crtdbg.h': No such file or directory



CAUSE
This behavior can occur when your Visual C++ .NET installation does not include installation for the C-Runtime (CRT) static library. Visual Studio .NET installer does not install CRT header files.



RESOLUTION
To resolve this problem, reinstall Visual C++ .NET. When you reinstall the application, install the corresponding header files. To do this, click to select the check boxes for both of the following static CRT library options:
 * Visual C++ Static Single-Threaded CRT Libraries

-and-
 * Visual C++ Static Multi-Threaded CRT Libraries

Note By default, these check boxes are selected.

To install the header files, follow these steps:
 * 1) During Setup, a dialog box appears where you can customize the installation. In this dialog box, expand Language Tools, and then expand Visual C++ .NET.
 * 2) Under Visual C++ .NET, expand Visual C++ Run-Time Libraries.
 * 3) Click to select the following check boxes to install the header files in the VC7\Include folder:
 * 4) * Visual C++ Static Single-Threaded CRT Libraries
 * 5) * Visual C++ Static Multi-Threaded CRT Libraries

If you have already installed Visual C++ .NET, you can add these options by running Setup again, either directly from the original installation media or through the Add/Remove Programs tool in Control Panel.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce the Behavior
 During Setup, a dialog box appears where you can customize the installation. In this dialog box, expand Language Tools, and then expand Visual C++ .NET. Under Visual C++ .NET, expand Visual C++ Run-Time Libraries. Click to clear the following check boxes to prevent Setup from installing the header files in the VC7\Include folder:  Visual C++ Static Single-Threaded CRT Libraries Visual C++ Static Multi-Threaded CRT Libraries</ul> </li> Start Visual Studio .NET.</li> Create a new Win32 Console Application.</li>  Append the following code to the source code: Compile the solution.</li></ol>
 * 1) include <crtdbg.h> </li>

Keywords: kberrmsg kbcrt kbsetup kbprb kbvs2005swept kbvs2005doesnotapply KB814701

-

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

© Microsoft Corporation. All rights reserved.