Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/sql-server-2008/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual c++ Mt.exe不';我不喜欢-dll选项中的绝对路径_Visual C++_Manifest - Fatal编程技术网

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不会报告任何错误。