Visual Studio 2013 致命错误 C1041/FS

2021-12-31 00:00:00 compiler-errors c++ visual-studio-2013

我使用的是 Visual Studio 2013.项目经常拒绝编译.如果我撤消任何更改,它仍然无法编译.我发现重新创建整个项目是有效的.不过,我想实际解决这个问题.我得到的错误是:

I'm using Visual Studio 2013. Every so often by project refuses to compile. If I undo any changes, it still won't compile. I've found that recreating the entire project works. I would like to actually fix the problem though. The error that I'm getting is:

1>Critic.cpp : fatal error C1041: cannot open program database 'c:usersusernamedesktopprojectNameprojectNamex64debugvc120.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS

我尝试按照以下说明操作但无济于事:http://msdn.microsoft.com/en-us/library/dn502518.aspx

I've tried following these instructions to no avail: http://msdn.microsoft.com/en-us/library/dn502518.aspx

有没有其他人遇到过这个问题并找到了解决方法?

Has anyone else encountered this and found a fix?

推荐答案

我遇到了这个问题,因为一个解决方案中的不同项目具有相同的中间目录.

I had this problem because different projects in a solution had the same intermediate directory.

变化

$(Platform)$(Configuration)

$(Platform)$(Configuration)$(ProjectName)

配置属性 |一般 |中间目录

在每个项目中都解决了它.

in each of the projects solved it.

相关文章