Win 7 SDK with VC++ 2005: Failure to compile in Debug mode

Win 7 SDK with VC++ 2005: Failure to compile in Debug mode

If you are getting weird Linking errors when using the Windows SDK for Windows 7 with Visual Studio 2005, you may need to install a patch.  If your usage scenario matches the one listed below, you will be unable to debug in the Windows SDK command line build environment or Visual Studio 2005 SP1.

Symptom: You have an .lib file or an .obj file that exposes C interfaces that was built by using Microsoft Visual C++ 2008 or for Windows 7. You add this file to a project as a link dependency. When you build the project in Microsoft Visual Studio 2005 Service Pack 1 (SP1) to generate an .exe file or a .dll file, you may receive the following link error:

Fatal error LNK1103: debugging information corrupt

Cause: This problem occurs because of a compatibility issue between Visual Studio 2005 and Visual Studio 2008 versions. For more information, see the Microsoft Support page for the patch: https://support.microsoft.com/kb/949009/.

Fix: Install the patch for Visual Studio 2005 SP1 available from: https://support.microsoft.com/kb/949009/.