开发者

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

开发者 https://www.devze.com 2023-01-25 14:28 出处:网络
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:

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\myin开发者_开发知识库fo\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


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:)


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.


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.


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


This worked for me.

Kill mspdbsrv.exe and reload Visual C++

MSDN


You can delete the *.obj file and rebuild the solution again, This problem might solve. Below link might be helpful for you- https://social.msdn.microsoft.com/Forums/vstudio/en-US/0ceac3c6-62f6-4fdf-82e1-d41e1b4fcd20/vs2008-c2471-cannot-update-program-database?forum=vclanguage

0

精彩评论

暂无评论...
验证码 换一张
取 消