gpt4 book ai didi

delphi - 错误: F1026 File not found: 'System.Actions.dcu' switching back to Delphi XE2 from XE3

转载 作者:行者123 更新时间:2023-12-03 15:37:11 29 4
gpt4 key购买 nike

我正在将代码从 XE2 移至 Delphi XE3,但它应该可以在两者中编译。我注意到某些单元会自动添加到 USES 子句中。当返回到 XE2 时,这会导致错误:

F1026 找不到文件:“System.Actions.dcu”(单元范围“System”仅表示 Win64、OSX32、Win32)

我从来没有真正正确地理解单元范围。是否有正确的解决方案来解决此问题,而不是将内容包装在编译器版本 {$IFDEF} 中?

谢谢

最佳答案

XE2 中没有 Actions 单元。它是 XE3 中的新增功能,作为将 Actions 支持引入 FireMonkey 的重构工作的一部分。这是有记录的:

What's New in Delphi and C++Builder XE3 :

Actions: FireMonkey now supports actions and action lists, two features that were previously supported only in VCL:

Important: Every FireMonkey or VCL application that uses actions must specify the System.Actions and System.Classes units in the uses section.

Changes in Implementation of VCL Actions

The System.Actions unit is created in the RTL package. Classes from the Vcl.ActnList unit that provide framework-independent action features are moved into this unit. Classes in System.Actions extend the most fundamental behavior of action features introduced in the TBasicAction and TBasicActionLink classes.

Important: As a result of these changes, you need to add the System.Classes and System.Actions units into the uses section.

Implementation of Actions in FireMonkey and VCL

FireMonkey (FMX)

The framework-independent implementation is common to FireMonkey and VCL: This basic actions functionality is extended in the new System.Actions RTL unit.

VCL

Framework-independent action features that were implemented in the Vcl.ActnList unit in previous RAD Studio releases are now in the new System.Actions unit in the RTL (common to VCL and FireMonkey).

Important: As a result of these changes, you need to add the System.Actions unit to the uses section (or #includes) in your VCL applications that use actions.

如果您实际上没有在代码中使用操作,则必须删除对 Actions 的引用,否则{$IFDEF} 将其删除。

关于delphi - 错误: F1026 File not found: 'System.Actions.dcu' switching back to Delphi XE2 from XE3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13063935/

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