我正在尝试编译Qt 4.7.4,但我总是得到这个错误:
mt.exe: general error c101008d: Failed to write the updated manifest to the resource of file "release\tutorial5.exe". The system cannot find the file specified.
NMAKE : fatal error U1077: '"C:\Program Files(x86)\Microsoft SDKs\Windows\v7.0A\bin\mt.exe"' : return code '0x1f'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files(x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
使用Visual Studio命令提示符我执行了以下命令:
configure -debug-and-release -opensource -platform win32-msvc2010
nmake
我该怎么做才能解决此错误?
答案 0 :(得分:3)
显然,tutorial5.exe无法正确或完全构建,并且永远不会创建exe。 Mt.exe是用于generating signed files and catalogs的Windows post-build工具。它返回一个错误,因为它无法找到该文件。
您的问题的解决方案包括从构建中排除演示和教程,或者在教程5的源代码中找到错误,以便正确构建。或者您甚至可以在其中放置一个虚拟版本的tutorial5.exe,看看是否是唯一出现的错误。
源代码中的错误可能与Windows中的Qt(MingW)和msvs2010编译器的默认编译器工具之间的差异以及它们尝试处理某些特定于Windows的代码的方式有关。
其他在线使用类似项目的人使用标记" sub-src"排除了nmake构建调用中的示例。
以下是release/tutorial5.exe
的Qt默认构建中的位置:
C:\QtSDK\Examples\4.7\qtestlib\tutorial5
并且在文档中:Qt 4.8: Chapter 5: Writing a Benchmark
您可能应该向Qt项目提交描述问题的故障单:bugreports.qt.io
祝你好运。答案 1 :(得分:1)
在Windows 7 64位上使用Qt 4.8.1,Creator 2.7.1,MSVC2010 Express的Qt控制台应用程序出现类似错误:
"mt.exe : general error c101008d: Failed to write the updated manifest to the resource of file ... "
然后是
The process cannot access the file because it is being used by another process.
但是,应用程序已构建,然后可以从Creator中“运行”。 “Build”也出现错误,即“Run”。 我最初认为这可能是一个时间问题,例如创建者正在启动shell以尽快运行程序。 文件删除后,它可以正常工作(没有错误)。
也许我的GIT(或TortoiseGIT)正在访问该文件,尽管我看不到这些进程。
编辑:它也可能是病毒扫描程序检查正在写入的文件.. Edit2:已确认:暂时禁用扫描程序可以解决问题
答案 2 :(得分:1)
尝试以管理员身份运行Microsoft visual studio命令提示符。当您转到魅力面板并搜索MSVS提示时,右键单击并以管理员身份运行。