KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q154289: HOWTO: Identify the Symptoms of File Corruption Problems

Article: Q154289
Product(s): Microsoft C Compiler
Version(s): 1.0,1.5,1.51,1.52,1.52b,1.52c,2.0,2.1,2.2,4.0,4.1,4.2,5.0,6.0
Operating System(s): 
Keyword(s): kbsetup kbtshoot kbGenInfo kbVC kbVC100 kbVC150 kbVC151 kbVC152 kbVC200 kbVC210 kbVC220
Last Modified: 31-JUL-2001

-------------------------------------------------------------------------------
The information in this article applies to:

- Microsoft Visual C++, versions 1.0, 1.5, 1.51, 1.52, 1.52b, 1.52c, 2.0, 2.1, 2.2, 4.0, 4.1 
- Microsoft Visual C++, 32-bit Enterprise Edition, versions 4.2, 5.0, 6.0 
- Microsoft Visual C++, 32-bit Professional Edition, versions 4.2, 5.0, 6.0 
- Microsoft Visual C++, 32-bit Learning Edition, version 6.0 
-------------------------------------------------------------------------------

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:

   - \MSVC\ for Visual C++ for Windows, versions 1.0, 1.5, 1.51, 1.52, 1.52b,
     and 1.52c.
   - \MSVC\ for Visual C++, 32-bit Edition, versions 1.0.
   - \MSVC20\ for Visual C++, 32-bit Edition, versions 2.0, 2.1, and 2.2.
   - \MSDEV\ for Visual C++, 32-bit Edition, versions 4.0, 4.1, and 4.2.
   - \DevStudio\VC for Visual C++, 32-bit Edition, version 5.0
   - \Microsoft Visual Studio\VC98 for Visual C++, 32-bit Edition, version 6.0

3. 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:

   - For versions 1.0, 2.0, 2.1, 2.2: Search for "Visual C++."
   - For versions 4.0, 4.1, 4.2: Search for "Developer."
   - For versions 5.0 and 6.0: Search for "DevStudio."

4. Shut down and restart Windows.

5. Reinstall Visual C++.

REFERENCES
==========

For additional information on troubleshooting installation problems, please see
the following articles in the Microsoft Knowledge Base:

  Q136258 Troubleshooting Visual C++ Setup Problems in Windows NT

  Q134347 Troubleshooting Visual C++ Setup Problems Under Windows 95

Additional query words:

======================================================================
Keywords          : kbsetup kbtshoot kbGenInfo kbVC kbVC100 kbVC150 kbVC151 kbVC152 kbVC200 kbVC210 kbVC220 kbVC400 kbVC410 kbVC420 kbVC500 kbVC600 kbGrpDSTools kbArtTypeINF 
Technology        : kbVCsearch kbVC400 kbAudDeveloper kbvc150 kbvc100 kbVC220 kbVC410 kbVC420 kbVC500 kbVC600 kbVC151 kbVC200 kbVC210 kbVC32bitSearch kbVC152 kbVC152a kbVC500Search
Version           : :1.0,1.5,1.51,1.52,1.52b,1.52c,2.0,2.1,2.2,4.0,4.1,4.2,5.0,6.0
Issue type        : kbhowto

=============================================================================

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.