Microsoft.CppCommon.targets(574,5): error MSB6006: "mt.exe" exited with code 31.解决办法
2014-01-07 16:25
603 查看
一、问题出现
用VS编译动态库dll文件的时候,ReBuild过程中会遇到Microsoft.CppCommon.targets(574,5): error MSB6006: "mt.exe" exited with code 31.这个问题,略坑爹啊,找了半天都是英文的解决办法,也没解释清楚,于是记录分享。具体错误如下
1> Generating code 1> Finished generating code 1> myRecast1.vcxproj -> C:\Users\Lufeng\Documents\Visual Studio 2010\Projects\myRecast1\x64\Release\recast.dll 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(574,5): error MSB6006: "mt.exe" exited with code 31. 1> 1>Build FAILED. 1> 1>Time Elapsed 00:00:01.57 ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
二、解决办法
设置project的属性Manifest Tool,把 "Embed Manifest" 设置成No,具体操作如图:这样就能正常编译了,ReBuild再多次都不会报错了。。
三、问题原因
具体问题原因如下,和manifest有关。According to Microsoft's documentation, Mt.exe is "a tool that generates signed files and catalogs". Mt.exe is used in the manifest generation process. If you don't know what a manifest is,further
documentation explains: "A manifest is an XML document that can be an external XML file or a resource embedded inside an application or an assembly. The manifest of an isolated application is used to manage the names and versions of shared side-by-side
assemblies to which the application should bind at run time. The manifest of a side-by-side assembly specifies its dependencies on names, versions, resources, and other assemblies."
具体翻译就是:根据微软的文档,MT.EXE是“生成签名的文件和目录的工具”。 MT.EXE采用的是清单生成过程。如果你不知道什么是明显的是,更多的文档解释说:“manifest 是一个
XML 文档,可以是外部 XML 文件,也可以是嵌入应用程序或程序集内的资源。isolated
application 的清单用于管理该应用程序在运行时应该绑定到的共享并行程序集的名称和版本。side-by-side
assembly 的清单指定该程序集在名称、版本、资源和其他程序集上的依赖项。“
全文完。。
相关文章推荐
- C语言字符与字符串查找函数strstr、wcsstr(wcswcs)、_tcsstr
- C++_运算符重载
- C/C++判断传入的UTC时间是否在今天
- 学习——>JNI设置C++与java的结合(2)
- 学习——>JNI设置C++与java的结合
- C++:30分钟了解C++11新特性
- C++设计模式2-原型模式Prototype
- c++ find 用法
- C/C++使用Lu脚本协程
- 提取汉字字库文件里面二进制数据转换为十六进制数据存到文件
- [STL源码剖析] 自增和自减运算符的重载
- 专-C++类型的认识
- C++输出字符型指针指向内存空间的地址
- How to Install Eclipse C/C++ Development Tool--转
- 使用C/C++给静态类型数据添加运算符重载功能
- 递归和迭代的区别
- C++源文件的后缀名问题
- 终端下运行cpp文件出现中文乱码问题
- C++ 11中的随机排列函数shuffle
- vim下查看cpp文件的编码格式