Microsoft KB Archive/154289

= How to identify the symptoms of file corruption problems in Visual C++ =

Article ID: 154289

Article Last Modified on 6/2/2005

-

APPLIES TO


 * Microsoft Visual C++ 1.0 Professional Edition
 * Microsoft Visual C++ 1.5 Professional Edition
 * Microsoft Visual C++ 1.51
 * Microsoft Visual C++ 1.52 Professional Edition
 * Microsoft Visual C++ 1.52 Professional Edition
 * Microsoft Visual C++ 1.52 Professional Edition
 * Microsoft Visual C++ 2.0 Professional Edition
 * Microsoft Visual C++ 2.1
 * Microsoft Visual C++ 2.2
 * Microsoft Visual C++ 4.0 Standard Edition
 * Microsoft Visual C++ 4.1 Subscription
 * Microsoft Visual C++ 4.2 Enterprise Edition
 * Microsoft Visual C++ 5.0 Enterprise Edition
 * Microsoft Visual C++ 6.0 Enterprise Edition
 * Microsoft Visual C++ 4.2 Professional Edition
 * Microsoft Visual C++ 5.0 Professional Edition
 * Microsoft Visual C++ 6.0 Professional Edition
 * Microsoft Visual C++ 6.0 Standard Edition

-



This article was previously published under Q154289



SUMMARY
This article describes how to identify the symptoms of file corruption problems. At some point after installing one of the products listed above, you may run into strange build errors that occur on simple projects or even with some of the sample projects shipped with the products. The problem is often not resolved until the product is completely removed from your system and reinstalled. In other words, simply running the setup program again without removing the product and its associated registry entries does not resolve the problem.

The likely cause of these errors is that the build tool reporting the error, or other files in your installation, have become corrupted. Following are a few examples of scenarios that can occur:


 * C1001 error from the compiler even on simple .CPP files that does not occur when compiling .C files. This is happening because the Visual C++ parser component (C1XX*.EXE) of the compiler is corrupted.
 * L1101 error in LAFXCWD.LIB even when building a 16-bit MFC application generated by AppWizard. This is happening because this MFC library file is corrupted.
 * LNK1141 error when building a DLL. This could be happening because the linker (LINK.EXE) is corrupted.
 * Internal link error during pass 1. This could be happening because the linker (LINK.EXE) or one of the libraries in your installation is corrupted.

These and other errors could also occur with the 32-bit versions of Visual C++ if multiple versions exist on the same system.



MORE INFORMATION
To verify that the error is really occurring because of a corrupted file in your installation, you can use the MS-DOS or Windows NT File Compare program (Fc.exe) to compare the original files on the product CD-ROM and the copies of the files that have been installed on your system. Use the following Command line:

FC /b [drive1:][path1]filename1 [drive2:][path2]filename2

The /B (binary) option tells the File Compare program to do a binary comparison on the files.

If you decide to do a complete reinstallation of the product, here are the general steps you should follow:


 * 1) Uninstall the product.
 * 2) Delete the directory where Visual C++ resides:


 * 1) * \MSVC\ for Visual C++ for Windows, versions 1.0, 1.5, 1.51, 1.52, 1.52b, and 1.52c.
 * 2) * \MSVC\ for Visual C++, 32-bit Edition, versions 1.0.
 * 3) * \MSVC20\ for Visual C++, 32-bit Edition, versions 2.0, 2.1, and 2.2.
 * 4) * \MSDEV\ for Visual C++, 32-bit Edition, versions 4.0, 4.1, and 4.2.
 * 5) * \DevStudio\VC for Visual C++, 32-bit Edition, version 5.0
 * 6) * \Microsoft Visual Studio\VC98 for Visual C++, 32-bit Edition, version 6.0
 * 7) Delete the registry keys (only in the 32-bit Editions):

In some cases these keys exist under HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER. Delete these keys in both locations:


 * 1) * For versions 1.0, 2.0, 2.1, 2.2: Search for "Visual C++."
 * 2) * For versions 4.0, 4.1, 4.2: Search for "Developer."
 * 3) * For versions 5.0 and 6.0: Search for "DevStudio."
 * 4) Shut down and restart Windows.
 * 5) Reinstall Visual C++.

