2016-07-07: 重新编译时vc90.pdb不是创建此预编译头时使用的pdb文件
使用VS2008在一个解决方案中包含多个项目时,当设置多个项目的中间目录为同一个目录时,在增量编译时出现“重新编译时vc90.pdb不是创建此预编译头时使用的pdb文件,请重新创建预编译头问题”,从而导致整个解决方案每次都必须重新全部生成。
在msdn上获得如下信息:
You may receive a "PRJ0008" or "C2471" or "C1083" or "D8022" or "LNK1103" or similar error message when you try to build a solution in Visual C++
Symptoms:
- D8022 : Cannot open 'RSP00000215921192.rsp'
- PRJ0008 : Could not delete file 'vc90.idb'.
- C1083 : Cannot open program database file 'vc90.pdb'
- C2471 : Cannot update program database 'vc90.pdb'
- LNK1103 : debugging information corrupt.
Cause:
This problem occurs when all of the following conditions are true:
- You have a solution with more than one project in it.
- Two or more of the projects are not dependent on each other.
- You have parallel builds enabled. (Tools -> Options: Projects and Solutions, Build and Run: "maximum number of parallel project builds" is set to a value greater than 1)
- You are building on a system with multiple CPUs (cores).
- Two or more of the non-dependent projects are configured to use the same Intermediate and/or Output directory.
- A specific race condition in mspdbsrv.exe remains uncorrected.
Resolution:
To resolve the problem do one or more of the following:
- Reconfigure the non-dependent projects to specify an Intermediate and Output directory that is different from one another, e.g. Output Directory = "$(SolutionDir)$(ProjectName)\$(ConfigurationName)", Intermediate Directory = "$(OutDir)".
- Adjust your solution's project dependencies (Project -> Project Dependencies...) so that each is dependent on another.
- Disable parallel builds.
- Add the "/onecpu" boot option to your boot.ini file.
- Change you BIOS settings to enable/use only one CPU.
- File a problem report with Microsoft Technical Support and keep bugging the ____ out of them until they eventually fix mspdbsrv.
Status:
The problem is a combination of both a user project configuration error as well as a race condition in Microsoft's "mspdbsrv.exe" utility that does not properly handle more than one thread calling it at the same time for the same file resulting in the file's HANDLE being left open.
Additionally Visual Studio itself and/or its build system (VCBUILD and/or MSBUILD) (or all three!) should be made smart enough to detect and alert the user of such user errors so that corrective action can be taken.
This problem has been around for a LOOOOOONG time.
Applies to:
- Microsoft Visual C++ 2005
- Microsoft Visual C++ 2008
- Others?
Respectfully submitted:
"Fish" (David B. Trout)
fish@infidels.org
p.s:
You're welcome. :)
Fish (David B. Trout)
最后,通过重新配置项目的中间输出目录成功解决上述问题。
遗留问题:在每个项目生成时,在对应的中间目录下都会生成vc90.pdb以及vc90.idb文件,如果全部项目的中间目录配置成相同目录,在项目依次生成过程中,后面生成的pdb文件会覆盖前面生成的pdb文件,从而导致修改部分源代码时,pdb文件可能不再是其对应项目生成的文件,因此需要重新生成整个解决方案。纯属猜测,后续可以使用逐步生成项目的方式验证结论。
2016-07-07: 重新编译时vc90.pdb不是创建此预编译头时使用的pdb文件的更多相关文章
- vs2008 vc90.pdb 不是创建此预编译头时使用的 pdb 文件,请重新创建预编译头
解决方案: 找到项目中的stdafx.cpp,右键属性,找到C/C++->预编译头, 设置为创建预编译头, 重新生成
- Xcode6之后创建Pch预编译文件
在Xcode6之前,创建一个新工程xcode会在Supporting files文件夹下面自动创建一个“工程名-Prefix.pch”文件,也是一个头文件,pch头文件的内容能被项目中的其他所有源文件 ...
- codeblocks + MinGW 以及vc 使用预编译头文件的方法
MinGW编译器: 1.打开工程文件,在工程文件浏览其中,在你要设置为预编译的头文件上,点击鼠标右键,选择“属性(properties)” 你会看到一个多页面的属性框,选择“构建(build)”页面 ...
- fatal error C1010: 在查找预编译头时遇到意外的文件结尾。是否忘记了向源中添加“#include "StdAfx.h"”? 解决方法
错误描述: fatal error C1010: 在查找预编译头时遇到意外的文件结尾.是否忘记了向源中添加“#include "StdAfx.h"”? 错误分析: 此错误发 ...
- 在查找预编译头时遇到意外的文件结尾。是否忘记了向源中添加“#include "StdAfx.h"”?
在查找预编译头时遇到意外的文件结尾.是否忘记了向源中添加“#include "StdAfx.h"”? 右键选择该文件.cpp格式的->属性->预编译头,→ 不使用预编译 ...
- fatal error C1010: 在查找预编译头时遇到意外的文件结尾
错误描述:fatal error C1010: 在查找预编译头时遇到意外的文件结尾.是否忘记了向源中添加“#include "stdafx.h"”? 错误分析: 此错误发生 ...
- fatal error C1010: 在查找预编译头时遇到意外的文件结尾 (转)
错误描述:fatal error C1010: 在查找预编译头时遇到意外的文件结尾.是否忘记了向源中添加“#include "stdafx.h"”? 错误分析: 此错误发生 ...
- 预编译加速编译(precompiled_header),指定临时文件生成目录,使项目文件夹更干净(MOC_DIR,RCC_DIR, UI_DIR, OBJECTS_DIR),#pragma execution_character_set("UTF-8")"这个命令是在编译时产生作用的,而不是运行时
预编译加速编译 QT也可以像VS那样使用预编译头文件来加速编译器的编译速度.首先在.pro文件中加入: CONFIG += precompiled_header 然后定义需要预编译的头文件: PREC ...
- 错误描述:fatal error C1010: 在查找预编译头时遇到意外的文件结尾。是否忘记了向源中添加“#include "stdafx.h"”?(转)
错误分析: 此错误发生的原因是编译器在寻找预编译指示头文件(默认#include "stdafx.h")时,文件未预期结束.没有找到预编译指示信息的头文件"stdafx. ...
随机推荐
- C#之属性
在C#类中有属性这个成员,C#属性用来读写类的字段.实际上是通过get和set访问器实现的.
- android 面试总结,后续注意学习
1.数据结构和算法 一般情况下,工作中是用不到的,但是就是问,每个公司都问,而且有的公司还问的特别深,还让你手写代码.我觉得这个确实有点恶心,我个人也是很讨厌算法的,但是真是没办法,人家就问,你说怎么 ...
- 在mahout安装目录下输入mahout 提示 ERROR: Could not find mahout-examples-*.job
错误:ERROR: Could not find mahout-examples-*.job in /home/grid/mahout-distribution-0.8 or /home/grid/m ...
- android技巧(四)数据库跨版本升级写法
当项目中接手的需求需要在就前数据库数据表做出修改时,不得不面对数据库表结构的更新问题.一般的sqlite数据库更新修改数据库版本号时都会自动调用SqliteOptenHelper及其子类中的onUpg ...
- windows下安装RabbitMq-Service
一.RaibbitMQ服务器配置 1. 准备工作.如果之前安装过RabbitMQ软件,若想重新安装,必须先把之前的RabbitMQ相关软件卸载. 2. 安装ERLANG语言包.首先到http://ww ...
- C#常用操作类库三(XML操作类)
/// <summary> /// XmlHelper 的摘要说明. /// xml操作类 /// </summary> public class XmlHelper { pr ...
- lsof 解决无法删除文件夹问题
今天在HPCC上面想要删除一个文件夹,结果说“Device or resource busy". 于是google一下,发现这个是因为有程序正在运行,所以无法删除. 那么怎样解决? lso ...
- notifyDataSetInvalidated()跟notifyDataSetChanged()的区别
public void notifyDataSetChanged(): 通过一个外部的方法控制,如果适配器的内容改变了,那么就会强制调用getView来刷新每个Item的内容.这个方法内部实现了在每个 ...
- UILabel 的高度根据文字内容调整
1.UILabel 对文字的自适应有两种方法. 1)将label的numberOfLines设为0;并添加自适应方法[titleLabel sizeToFit],但是这种方法并不理想. 2)根据文字的 ...
- UVa 10129单词(欧拉回路)
https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem& ...