一、问题出现
用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,具体操作如图: