Visual c++ Mt.exe不';我不喜欢-dll选项中的绝对路径
只是我,还是讨厌Visual c++ Mt.exe不';我不喜欢-dll选项中的绝对路径,visual-c++,manifest,Visual C++,Manifest,只是我,还是讨厌-dll选项中的绝对路径 我在VisualStudio 2008中有一个VisualC++项目,它引用了一个孤立的(无注册的)COM DLL。我使用预构建事件将COM DLL复制到项目的输出目录中。在项目的属性中,在“配置属性”>“清单工具”>“独立COM”对话框中,我使用了以下设置: Type Library File: $(OutDir)\MyCom.tlb Registrar Script File: Component File Name: $(OutDir)\MyCom
-dll
选项中的绝对路径
<>我在VisualStudio 2008中有一个VisualC++项目,它引用了一个孤立的(无注册的)COM DLL。我使用预构建事件将COM DLL复制到项目的输出目录中。在项目的属性中,在“配置属性”>“清单工具”>“独立COM”对话框中,我使用了以下设置:
Type Library File: $(OutDir)\MyCom.tlb
Registrar Script File:
Component File Name: $(OutDir)\MyCom.dll
Replacements File:
Visual Studio向我显示生成的命令行命令:
mt.exe /nologo
/tlb:"C:\[ ... snip ... ]\OtherProject\Release\MyCom.tlb"
/dll:"C:\[ ... snip ... ]\OtherProject\Release\MyCom.dll"
/outputresource:"..\Release\OtherProject.exe;#1"
它构建得很好,但我得到一个运行时FileNotFound异常。应用程序找不到MyCom.dll!将组件文件名更改为以下相对路径可以正常工作:
Component File Name: ..\$(ConfigurationName)\MyCom.dll
如果为-dll提供了绝对路径,则Visual Studio 2010附带的mt.exe不会报告任何错误。