VC ++快递,我该如何修复这个错误?

发布于 2024-08-17 20:06:43 字数 937 浏览 11 评论 0原文

我有 C# 编程经验,但本学期我正在学习 C++ 课程,并且正在编写我的第二个项目,但当我尝试构建程序的调试配置时,我不断收到此错误。

我的构建日志如下,对发生的事情有什么想法吗?我不知所措。

谢谢大家!

1>------ Rebuild All started: Project: Project_2, Configuration: Debug Win32 ------
1>Deleting intermediate and output files for project 'Project_2', configuration 'Debug|Win32'
1>Compiling...
1>main.cpp
1>Linking...
1>LINK : C:\Users\Alex\Documents\Visual Studio 2008\Projects\Project_2\Debug\Project_2.exe not found or not built by the last incremental link; performing full link
1>Embedding manifest...
1>Project : error PRJ0002 : Error result 31 returned from 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\mt.exe'.
1>Build log was saved at "file://c:\Users\Alex\Documents\Visual Studio 2008\Projects\Project_2\Project_2\Debug\BuildLog.htm"
1>Project_2 - 1 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

I have experience programming in C#, but I'm taking a C++ class this semester, and I'm writing my second project, but I keep getting this error when I try to build a debug configuration of my program.

My build log is below, any ideas on what's going on? I'm at a loss.

Thanks everyone!

1>------ Rebuild All started: Project: Project_2, Configuration: Debug Win32 ------
1>Deleting intermediate and output files for project 'Project_2', configuration 'Debug|Win32'
1>Compiling...
1>main.cpp
1>Linking...
1>LINK : C:\Users\Alex\Documents\Visual Studio 2008\Projects\Project_2\Debug\Project_2.exe not found or not built by the last incremental link; performing full link
1>Embedding manifest...
1>Project : error PRJ0002 : Error result 31 returned from 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\mt.exe'.
1>Build log was saved at "file://c:\Users\Alex\Documents\Visual Studio 2008\Projects\Project_2\Project_2\Debug\BuildLog.htm"
1>Project_2 - 1 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

当梦初醒 2024-08-24 20:06:43

微软将类似情况归咎于防病毒软件

Microsoft blames antivirus for a similar case.

避讳 2024-08-24 20:06:43

您应该查看构建输出中给出的 buildlog.htm 文件。它将为您提供有关所发生事件的更多(有用)信息。

You should look at the buildlog.htm file that is given in the build output. It will give you more (useful) information about what has happened.

痴梦一场 2024-08-24 20:06:43

尝试将 AV 设置为忽略项目目录而不是 VC++ 目录。

try setting your AV to ignore your project directories instead of VC++ directory.

薔薇婲 2024-08-24 20:06:43

项目:错误 PRJ0002:从“C:\Program”返回错误结果 31
文件\Microsoft SDKs\Windows\v6.0A\bin\mt.exe'。

面临同样的问题清理重建解决了它。

Project : error PRJ0002 : Error result 31 returned from 'C:\Program
Files\Microsoft SDKs\Windows\v6.0A\bin\mt.exe'.

Faced the same issue Cleaning the rebuilding solved it.

北恋 2024-08-24 20:06:43

我关闭了 Microsoft Security Essentials,问题就消失了。
奇怪的是,它只发生在调试配置中。

I turned off the Microsoft Security Essentials and the problem is gone.
Strange that it only happened for the debug configuration.

缘字诀 2024-08-24 20:06:43

我在构建管道中遇到了类似的问题,95-99% 的构建都会引发错误。 mt.exe 中似乎存在与先前构建步骤中的锁定文件相关的问题;如果 mt.exe 延迟 5 秒执行,则完全没有问题。我注意到,这个问题可以通过在构建中引入一些延迟或用 v7.1 SDK 中的 mt.exe 替换二进制文件来解决

I've meet similar problem in my build pipeline, the error was thrown for 95-99% of the builds. It looks like there was a problem in mt.exe assosociated with locked files from previous build steps; If mt.exe was executed with 5s delay there was no problem at all. I've noticed, that the problem may be fixed by introducing some delay in build or by replacing the binary with mt.exe from v7.1 SDK

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文