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. ...
随机推荐
- JS 信息提示弹框封装
// 功能提示弹框 function tipsBox ( option ) { var html = ''; if ( option.type == 'success' ) { html += '&l ...
- UIlabel 属性text
UILabel *pLabel = [[UILabel alloc] initWithFrame:CGRectMake(0,100,200,100)]; pLabel.text = @"测试 ...
- java进程性能分析步骤-超越昨天的自己系列(11)
java进程load过高分析步骤: top 查看java进程情况 top -Hp 查看某个进程的具体线程情况 printf 0x%x 确认哪一个线程占用cpu比较多,拿出来转成16进制 ...
- find 命令的参数详解
使用name选项 文件名选项是find命令最常用的选项,要么单独使用该选项,要么和其他选项一起使用. 可以使用某种文件名模式来匹配文件,记住要用引号将文件名模式引起来.不管当前路径是什么,如果想要在自 ...
- Angularjs中的promise
promise 是一种用异步方式处理值的方法,promise是对象,代表了一个函数最终可能的返回值或抛出的异常.在与远程对象打交道非常有用,可以把它们看成一个远程对象的代理. 要在Angular中创建 ...
- mysql保存数据提示1366 Incorrect string value: ‘\xF0\x9F\x98\x8A\xF0\x9F…’ 解决
在保存数据时我们如果页面编辑与数据库字段编码不一样或字符集超出你了mysql数据库中的字符类型就有可能出一\\xF0\\x9F\\x98\\x8A\\xF0\\x9F提示了,下面我来简单的解决方法. ...
- Windows 10 解决 0x80070021 错误
Windows 10 已经不支持 aspnet_regiis -i. 启动和关闭Windows功能中安装 ".NET Framework 4.6 高级服务" 即可解决. 以下是借鉴 ...
- Ecs下的两台mysql做主从设置
一.主库配置master 1.用户root账户进入到mysql mysql -uroot -p 2.创建用于主从同步的账户,并赋予权限,由于这个账户只是作为同步数据用,所以分配权限不要过大,我这里只赋 ...
- Network Address Translation(转载)
Network Address Translation 来源:http://alexanderlaw.blog.hexun.com/9791596_d.html 地址转换用来改变源/目的 ...
- Mybatis知识点总结
---恢复内容开始--- Mybatis知识点总结 1.#{}和${}的区别是什么? 答:#{}的使用场景:在表的sql映射文件中如下使用: <mapper namespace="co ...