Microsoft KB Archive/316343

= BUG: &quot;Fatal Error C1083&quot; Error Message When You Try to Create a C++ Application =

PSS ID Number: 316343

Article Last Modified on 7/23/2002

-

The information in this article applies to:


 * Microsoft Visual C++ .NET (2002)

-



This article was previously published under Q316343



SYMPTOMS
When you install Visual C++ .NET as either a stand-alone installation or as part of Microsoft Visual Studio .NET, and then you try to create a Visual C++ .NET application, you may receive an error message similar to the following:

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



CAUSE
This behavior can occur if your Visual C++ .NET installation is missing some of the necessary C-Runtime (CRT) library and Standard Template Library (STL) header files. When this is the case and you create Visual C++ .NET applications that make use of these header files, you receive an error message similar to the one described in the &quot;Symptoms&quot; section of this article.



RESOLUTION
To properly install Visual C++ .NET and the corresponding header files, select one or both of the static CRT library check boxes (Visual C++ Static Single-Threaded CRT Libraries and/or Visual C++ Static Multi-Threaded CRT Libraries).

NOTE: The check boxes to install the static CRT libraries are selected by default, unless you specifically clear them.

To do this, follow these steps:

 During Setup, an options window is displayed, in which you can customize the installation. In the options window, click the plus sign (+) next to Language Tools (to expand it), and then expand Visual C++ .NET. Under Visual C++ .NET, expand Visual C++ Run-Time Libraries. Click to select one or both of the following check boxes (out of the four displayed) to install the necessary header files in the VC7\Include folder:

Visual C++ Static Single-Threaded CRT Libraries

Visual C++ Static Multi-Threaded CRT Libraries

If you opted to install CRT source code by selecting the Visual C++ CRT Source Code check box, all of the necessary header files are installed to the VC7\CRT\Src folder, irrespective of your selection of static CRT libraries. (When you select one of the static CRT libraries, this ensures that these files are installed to the VC7\Include folder).

NOTE: The compiler may not search the VC7\CRT\Src folder while it compiles your application if this folder is not included in the Include Search Folders list (either by using the /I compiler option or by adding it to the VC++ Directories in the Visual Studio .NET Development Environment folder (in Projects under Options on the Tools menu). If you have already installed Visual C++ .NET, you can add just those options listed in step 3 by re-running Setup either from the original installation media or by using the Add/Remove Programs tool under Control Panel (which prompts you for the original installation media).



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

Keywords: kbbug kbCRT kberrmsg kbsetup KB316343

Technology: kbAudDeveloper kbVCNET kbVCsearch

-

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

© 2003 Microsoft Corporation. All rights reserved.