【问题标题】:Is the any way to get the sub version of Delphi compiler有什么方法可以获取Delphi编译器的子版本
【发布时间】:2021-05-29 20:30:59
【问题描述】:

我的组件库使用条件编译来使源代码兼容自 Delphi 7 以来的所有 Delphi 编译器。我使用 DCC32.exe 的 CompilerVersion 定义。例如

{$IF CompilerVersion >= 24}
   .... 
{$IFEND}

这一直运行良好,但现在不同 10.4 版本之间的 VCL 库存在一些重大差异。这要求代码在 10.4、10.4.1 和 10.4.2 中不同。

如何查看编译器的 Delphi 子版本?

【问题讨论】:

    标签: delphi version


    【解决方案1】:

    从 Delphi 10.4.1 开始,您可以使用(例如)检查正在使用哪个 RTL/源:

    {$IF Declared(RTLVersion1042)} // Compiled using Delphi 10.4.2 RTL
    

    【讨论】:

    • 真的是RTL1024吗? documentation 显示 RTLVersion: Comp = 34;RTLVersion1041: Boolean = True;RTLVersion1042: Boolean = True;
    • 谢谢,雷米.. 已修复
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-01-22
    • 2012-01-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-08-13
    • 2013-03-20
    相关资源
    最近更新 更多