[英].tlb files not generating in vcxproj .rc file
On building my project is giving error of not generating (.tlb) file in (vcxproj .rc) file: 在构建我的项目时出现错误,未在(vcxproj .rc)文件中生成(.tlb)文件:
error RC2135: file not found: DocOutPPML.tlb [C:\\ElxVC\\SRC\\OutputConverters\\DocOutPPML\\DocOutPPMLCHS.vcxproj]
错误RC2135:找不到文件:DocOutPPML.tlb [C:\\ ElxVC \\ SRC \\ OutputConverters \\ DocOutPPML \\ DocOutPPMLCHS.vcxproj]
Using visual studio 2010 I converted this proj from vcproj to vcxproj. 使用Visual Studio 2010,我将此项目从vcproj转换为vcxproj。
You need the resource compiler to have the correct path where to your type library. 您需要资源编译器具有正确的类型库路径。 The place where you can set this is under resource configuration property → general → additional include directories .
可以在资源配置属性 → 常规 → 其他包含目录下进行设置 。 Just specify there where your type library is.
只需在其中指定类型库的位置即可。
You have to generate .tlb file. 您必须生成.tlb文件。
/TLBOUT:[path]filename
/ TLBOUT:[路径]文件名
Where 哪里
path: An absolute or relative path specification for where the .tlb file should be created. path:应在其中创建.tlb文件的绝对或相对路径规范。
filename: Specifies the name of the .tlb file created by the MIDL compiler. filename:指定MIDL编译器创建的.tlb文件的名称。 No file extension is assumed;
不假定文件扩展名; specify filename.tlb if you want a .tlb extension.
如果要扩展名为.tlb,请指定filename.tlb。
Remark 备注
To set this linker option in the Visual Studio development environment 在Visual Studio开发环境中设置此链接器选项
Open the project's Property Pages dialog box. 打开项目的“属性页”对话框。 For details, see Setting Visual C++ Project Properties.
有关详细信息,请参见设置Visual C ++项目属性。
Click the Linker folder. 单击链接器文件夹。
Click the Embedded IDL property page. 单击“嵌入式IDL”属性页。
Modify the Type Library property. 修改类型库属性。
You can specify the right name for the "(.tlb) file" in the command line: 您可以在命令行中为“(.tlb)文件”指定正确的名称:
midl <your>.idl /tlb <any>.tlb
echo === Log === cd "$(ProjectDir)" midl.exe DocOutPPML.idl /tlb DocOutPPML.tlb cd "$(TargetDir)" echo ===
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.