gpt4 book ai didi

c++ - idl 和 odl 的区别

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:07:50 24 4
gpt4 key购买 nike

IDL 和 ODL 的主要区别是什么。我有很多项目,有些有idl,有些有odl。我应该在哪里使用它们。什么是权衡。

最佳答案

ODL 是一种传统格式。它已被 MIDL(又名:IDL)取代。查看这篇 Microsoft 官方文章:MIDL and ODL

The Microsoft Interface Definition Language (MIDL) now includes the complete Object Definition Language (ODL) syntax.

现在,如果您有 ODL 文件,您可以保持原样,或将它们迁移到 IDL 中。这将是推荐的解决方案,但它可能容易出错。它与您当前用于从中构建生成文件的工具 MIDL.exe 或 MkTypeLib.exe 密切相关。再次检查有关这些的官方文档:Differences Between MIDL and MkTypLib

In general, you will want to use the MIDL syntax in your IDL files. However, if you need to compile an existing ODL file, or otherwise maintain compatibility with MkTypLib, use the /mktyplib203 MIDL compiler option to force MIDL to behave like Mkktyplib.exe, version 2.03. (This is the last release of the MkTypLib tool.) Specifically, the /mktyplib203 option resolves these differences:

关于c++ - idl 和 odl 的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16560661/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com