VC2008编译错误打开sbr文件(C2418 C1903 C2471)

时间:2022-09-01 09:19:56

EDIT: See my answer below for the hotfix.

编辑:请参阅下面的修补程序的答案。

ORIGINAL QUESTION:

In setting up for our boat-programming adventure I have to set up source control and fix project files for a team to use them. (the project was previously only being worked on by one person who took shortcuts with setting up the project includes, etc)

在设置我们的船编程冒险时,我必须设置源代码控制并修复项目文件以供团队使用。 (该项目之前只有一个人通过设置项目包括的快捷方式等工作)

I am fixing those SLN and Proj files. When trying to do a build on an external USB drive (I have not tried it on the primary hard drive) I am getting odd errors (lots of them for various files):

我正在修复那些SLN和Proj文件。当尝试在外部USB驱动器上进行构建时(我没有在主硬盘驱动器上尝试过)我遇到了奇怪的错误(很多错误都存在于各种文件中):

fatal error C1083: Cannot open compiler generated file: '.\Debug\.sbr': Permission denied

致命错误C1083:无法打开编译器生成的文件:'。\ Debug \ .sbr':权限被拒绝

These files are referenced in the vcproj file with relative paths in double quotes:

这些文件在vcproj文件中引用,相对路径用双引号表示:

RelativePath="..\..\Source\.cpp"

I get the same errors form within a sln file in the IDE or if I call msbuild with the sln file.

我在IDE中的sln文件中获得相同的错误形式,或者如果我使用sln文件调用msbuild。

The files are kind of "shared" for a few sln files (projects).

这些文件对于一些sln文件(项目)来说是“共享的”。

The person who originally created the SLN files is not known for being a wizard at configuring MSDev or making things work for teams.

最初创建SLN文件的人不是一个配置MSDev或让团队工作的向导。

Is this an issue with the way the source files are referenced? Any suggestions on how to fix these?

这是引用源文件的方式的问题吗?有关如何解决这些问题的任何建议?

This URL does not seem to have helpful information:

此网址似乎没有有用的信息:

Fatal Error C1083 on MSDN

MSDN上的致命错误C1083

Note - there were/are still hardcoded paths in the proj file, but i don;t see them for these files. They were mostly for the include and lib dirs. I think I removed them all.

注意 - proj文件中仍有/仍然是硬编码路径,但我不看这些文件。他们主要是包括和lib dirs。我想我全部删除了它们。

I also get these errors:

我也得到这些错误:

..\..\Source\.cpp : error C2471: cannot update program database '\debug\vc90.pdb'

.. \ .. \ Source \ .cpp:错误C2471:无法更新程序数据库'\ debug \ vc90.pdb'

..\..\Source\.cpp(336) : fatal error C1903: unable to recover from previous error(s); stopping compilation

.. \ .. \ Source \ .cpp(336):致命错误C1903:无法从之前的错误中恢复;停止编译

..\..\Source\.cpp(336) : error C2418: cannot delete browser file: .\Debug\.sbr

.. \ .. \ Source \ .cpp(336):错误C2418:无法删除浏览器文件:。\ Debug \ .sbr

6 个解决方案

#1


Title: 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++

标题:当您尝试在Visual C ++中构建解决方案时,您可能会收到“PRJ0008”或“C2471”或“C1083”或“D8022”或“LNK1103”或类似的错误消息

Symptoms:

  • D8022 : Cannot open 'RSP00000215921192.rsp'
  • D8022:无法打开'RSP00000215921192.rsp'

  • PRJ0008 : Could not delete file 'vc90.idb'.
  • PRJ0008:无法删除文件'vc90.idb'。

  • C1083 : Cannot open program database file 'vc90.pdb'
  • C1083:无法打开程序数据库文件'vc90.pdb'

  • C2471 : Cannot update program database 'vc90.pdb'
  • C2471:无法更新程序数据库'vc90.pdb'

  • LNK1103 : debugging information corrupt.
  • LNK1103:调试信息损坏。

Cause:

This problem occurs when all of the following conditions are true:

满足所有以下条件时发生此问题:

  1. You have a solution with more than one project in it.
  2. 您有一个包含多个项目的解决方案。

  3. Two or more of the projects are not dependent on each other.
  4. 两个或多个项目不相互依赖。

  5. 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)
  6. 您已启用并行构建。 (工具 - >选项:项目和解决方案,构建和运行:“最大并行项目构建数”设置为大于1的值)

  7. You are building on a system with multiple CPUs (cores).
  8. 您正在构建具有多个CPU(核心)的系统。

  9. Two or more of the non-dependent projects are configured to use the same Intermediate and/or Output directory.
  10. 两个或多个非依赖项目配置为使用相同的中间和/或输出目录。

  11. A specific race condition in mspdbsrv.exe remains uncorrected.
  12. mspdbsrv.exe中的特定竞争条件仍未修正。

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)".
  • 重新配置非依赖项目以指定彼此不同的中间和输出目录,例如输出目录=“$(SolutionDir)$(ProjectName)\ $(ConfigurationName)”,中间目录=“$(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.
  • 将“/ onecpu”引导选项添加到boot.ini文件中。

  • Change you BIOS settings to enable/use only one CPU.
  • 更改BIOS设置以启用/仅使用一个CPU。

  • File a problem report with Microsoft Technical Support and keep bugging the crap out of them until they eventually fix mspdbsrv.
  • 向Microsoft技术支持部门提交问题报告,并在他们最终修复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.

问题是用户项目配置错误以及Microsoft的“mspdbsrv.exe”实用程序中的竞争条件的组合,该实用程序未正确处理多个线程同时为同一文件调用它导致文件的HANDLE被打开了。

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.

此外,Visual Studio本身和/或其构建系统(VCBUILD和/或MSBUILD)(或全部三个!)应该足够智能,以检测并警告用户此类用户错误,以便采取纠正措施。

This problem has been around for a LOOOOOONG time.

这个问题已经存在了LOOOOOONG时间。

Applies to:

  • Microsoft Visual C++ 2005
  • Microsoft Visual C ++ 2005

  • Microsoft Visual C++ 2008
  • Microsoft Visual C ++ 2008

  • Others?

Respectfully submitted:

"Fish" (David B. Trout)
fish@infidels.org

“鱼”(David B. Trout)fish@infidels.org

p.s:

You're welcome. :)

别客气。 :)

#2


Hmmm.

Perhaps:

http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/0ceac3c6-62f6-4fdf-82e1-d41e1b4fcd20/

there is a hotfix from MS

有一个MS的修补程序

http://code.msdn.microsoft.com/KB946040

http://support.microsoft.com/kb/946040

That might be my problem. I think it might only be on one machine I have.

那可能是我的问题。我想它可能只在我拥有的一台机器上。

EDIT:

I downloaded and ran the hotfix installer. It seems to have fixed it.

我下载并运行了修补程序安装程序。它似乎修复了它。

#3


I get this same error when I physically remove a file from disk, but leave it in VS. In VS2005 it would give a much better : fatal error file not found. I think this is a bug in VS2008. The hotfix mentioned above didn't help me.

当我从磁盘中物理删除文件时,我得到同样的错误,但是将其保留在VS中。在VS2005中它会提供更好的:找不到致命错误文件。我认为这是VS2008中的一个错误。上面提到的修补程序对我没有帮助。

#4


In my case it was my virus package (Trend Micro) causing all the problems. I added my Dev folders to the Ignore/White lists to solve the problem

在我的情况下,这是我的病毒包(趋势科技)导致所有问题。我将我的Dev文件夹添加到Ignore / White列表中以解决问题

#5


delete your debug folder and build your project agian.

删除您的调试文件夹并构建您的项目agian。

#6


Occastionally my Visual Studio will suddenly decide something like this. I have found it maybe help to toggle to release, do a full rebuild, then toggle back to debug.

偶尔我的Visual Studio会突然决定这样的事情。我发现切换到发布,完全重建,然后切换回调试可能会有所帮助。

#1


Title: 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++

标题:当您尝试在Visual C ++中构建解决方案时,您可能会收到“PRJ0008”或“C2471”或“C1083”或“D8022”或“LNK1103”或类似的错误消息

Symptoms:

  • D8022 : Cannot open 'RSP00000215921192.rsp'
  • D8022:无法打开'RSP00000215921192.rsp'

  • PRJ0008 : Could not delete file 'vc90.idb'.
  • PRJ0008:无法删除文件'vc90.idb'。

  • C1083 : Cannot open program database file 'vc90.pdb'
  • C1083:无法打开程序数据库文件'vc90.pdb'

  • C2471 : Cannot update program database 'vc90.pdb'
  • C2471:无法更新程序数据库'vc90.pdb'

  • LNK1103 : debugging information corrupt.
  • LNK1103:调试信息损坏。

Cause:

This problem occurs when all of the following conditions are true:

满足所有以下条件时发生此问题:

  1. You have a solution with more than one project in it.
  2. 您有一个包含多个项目的解决方案。

  3. Two or more of the projects are not dependent on each other.
  4. 两个或多个项目不相互依赖。

  5. 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)
  6. 您已启用并行构建。 (工具 - >选项:项目和解决方案,构建和运行:“最大并行项目构建数”设置为大于1的值)

  7. You are building on a system with multiple CPUs (cores).
  8. 您正在构建具有多个CPU(核心)的系统。

  9. Two or more of the non-dependent projects are configured to use the same Intermediate and/or Output directory.
  10. 两个或多个非依赖项目配置为使用相同的中间和/或输出目录。

  11. A specific race condition in mspdbsrv.exe remains uncorrected.
  12. mspdbsrv.exe中的特定竞争条件仍未修正。

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)".
  • 重新配置非依赖项目以指定彼此不同的中间和输出目录,例如输出目录=“$(SolutionDir)$(ProjectName)\ $(ConfigurationName)”,中间目录=“$(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.
  • 将“/ onecpu”引导选项添加到boot.ini文件中。

  • Change you BIOS settings to enable/use only one CPU.
  • 更改BIOS设置以启用/仅使用一个CPU。

  • File a problem report with Microsoft Technical Support and keep bugging the crap out of them until they eventually fix mspdbsrv.
  • 向Microsoft技术支持部门提交问题报告,并在他们最终修复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.

问题是用户项目配置错误以及Microsoft的“mspdbsrv.exe”实用程序中的竞争条件的组合,该实用程序未正确处理多个线程同时为同一文件调用它导致文件的HANDLE被打开了。

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.

此外,Visual Studio本身和/或其构建系统(VCBUILD和/或MSBUILD)(或全部三个!)应该足够智能,以检测并警告用户此类用户错误,以便采取纠正措施。

This problem has been around for a LOOOOOONG time.

这个问题已经存在了LOOOOOONG时间。

Applies to:

  • Microsoft Visual C++ 2005
  • Microsoft Visual C ++ 2005

  • Microsoft Visual C++ 2008
  • Microsoft Visual C ++ 2008

  • Others?

Respectfully submitted:

"Fish" (David B. Trout)
fish@infidels.org

“鱼”(David B. Trout)fish@infidels.org

p.s:

You're welcome. :)

别客气。 :)

#2


Hmmm.

Perhaps:

http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/0ceac3c6-62f6-4fdf-82e1-d41e1b4fcd20/

there is a hotfix from MS

有一个MS的修补程序

http://code.msdn.microsoft.com/KB946040

http://support.microsoft.com/kb/946040

That might be my problem. I think it might only be on one machine I have.

那可能是我的问题。我想它可能只在我拥有的一台机器上。

EDIT:

I downloaded and ran the hotfix installer. It seems to have fixed it.

我下载并运行了修补程序安装程序。它似乎修复了它。

#3


I get this same error when I physically remove a file from disk, but leave it in VS. In VS2005 it would give a much better : fatal error file not found. I think this is a bug in VS2008. The hotfix mentioned above didn't help me.

当我从磁盘中物理删除文件时,我得到同样的错误,但是将其保留在VS中。在VS2005中它会提供更好的:找不到致命错误文件。我认为这是VS2008中的一个错误。上面提到的修补程序对我没有帮助。

#4


In my case it was my virus package (Trend Micro) causing all the problems. I added my Dev folders to the Ignore/White lists to solve the problem

在我的情况下,这是我的病毒包(趋势科技)导致所有问题。我将我的Dev文件夹添加到Ignore / White列表中以解决问题

#5


delete your debug folder and build your project agian.

删除您的调试文件夹并构建您的项目agian。

#6


Occastionally my Visual Studio will suddenly decide something like this. I have found it maybe help to toggle to release, do a full rebuild, then toggle back to debug.

偶尔我的Visual Studio会突然决定这样的事情。我发现切换到发布,完全重建,然后切换回调试可能会有所帮助。