What are C2471,C1083 errors related to a VC2008 project and how to correct them

10,204

Solution 1

Solution 1: Locate *.vcxproj file in your solution, open in a text editor and search for 'DebugInformationFormat' and set it to 'OldStyle'.  Reload your project and build. If you have multiple projects in your solution, this change needed for all the *.vcxproj files.

< DebugInformationFormat>OldStyle< /DebugInformationFormat>

Solution 2: From Visual Studio, on every project in your solution right click and open Properties. Expand 'Configuration Properties' > 'C/C++' > 'General'. Change the 'Debug Information Format' to 'C7 compatible (/Z7)'. Then build your solution.

This worked for me. (YMMV = Your mileage may vary:)

Solution 2

I've seen the same behaviour when converting a VS2003.Net solution to run on later IDEs. My guess is that your solution contains multiple projects which point to the same intermediate directory. In VS2005 and later, projects that don't depend on each other can be built in parallel so that if the same working dir is used, you can get file conflicts like this.

Check this as follows. In Solution Explorer, right click on one of the failing projects and select Properties. In Configuration Properties -> General section, make sure that every project has a different 'Intermediate Directory'. Try your build again using 'Rebuild Solution' to clean everything out.

Solution 3

Most of the times when I get "C2471: cannot update program database" it's because the PDB file is locked for some reason. Usually in my case that turns out to be because I have the program running in some other window, which loads the PDB file in to memory.

When that's not the reason, I find doing a rebuild-all magically fixes the problem.

Solution 4

I've encountered the same type of error myself with no end of frustration.

I finally fixed it by applying the Microsoft hot fix found in this knowledge base article: http://archive.msdn.microsoft.com/KB946040

Share:
10,204
rsjethani
Author by

rsjethani

I like coding.........I like to learn and share with brilliant minds all over the world........

Updated on June 05, 2022

Comments

  • rsjethani
    rsjethani almost 2 years

    I had a VC2008 project very complicated.Inorder to understand it's inner workings I tried to simplify it and now I am getting 289 errors of the following type for most of the files:

    Error 5 error C2471: cannot update program database 'c:\users\ryan\documents\visual studio 2008\projects\vc\myinfo\cli\debug\vc90.pdb' c:\users\ryan\documents\visual studio 2008\projects\vc\myinfo\cli\mediainfo\file__analyze_buffer_minimizesize.cpp 1 CLI

    Error 6 fatal error C1083: Cannot open program database file: 'c:\users\ryan\documents\visual studio 2008\projects\vc\myinfo\cli\debug\vc90.pdb': No such file or directory c:\users\ryan\documents\visual studio 2008\projects\vc\myinfo\cli\mediainfo\file__analyze_buffer_minimizesize.cpp 1 CLI

    My system : win7/VS2008

  • Steve Townsend
    Steve Townsend over 13 years
    @ryanlancer - then @Brian and @Noah Roberts's suggestion in comments to back out your changes and reimplement them incrementally, building after each change, is your best bet. If you have not got the original project and solution (gulp) then you could try to recreate the project side by side with what you have now using "New Project from Existing Code". This is painful though.
  • John Dibling
    John Dibling over 13 years
    @ryanlancer: then i'm afraid you have no choice but to back out your changes somehow
  • Steve Townsend
    Steve Townsend over 13 years
    Try killing mspdbsrv.exe and then restart the IDE and rebuild. There's a bug in this process supposedly.
  • Steve Townsend
    Steve Townsend over 13 years
    Another possibility is noted here - try disabling precompiled headers - lorenheiny.com/2008/03/31/…