gpt4 book ai didi

delphi - 为什么编译器不能在我的包中包含外部 DCU?

转载 作者:行者123 更新时间:2023-12-03 18:19:30 26 4
gpt4 key购买 nike

我有这个错误:

E2411 Unit %s in package %s refers to unit %s which is not found in any package. Packaged units must refer only to packaged units (Delphi)

Delphi 帮助非常有用,它说:

No further information is available for this error or warning.

为什么我不能引用不属于包的单元?

更新:

永无止境的故事:将文件放在自己的包中会破坏其他东西:Unit GIFImg was compiled with a different version of CCR.Exif.Consts.SOutOfResources这就是为什么我不想将文件放在自己的包中。

最佳答案

您不能引用不属于包的单元,因为包需要是一个独立的软件。这意味着一个包必须包含它使用的所有单元,或者通过其 requires 子句中的包使它们可用。

要解决此错误,您可以选择

  • 将单元包含在您正在构建的包中,或者
  • 将包含该单元的包添加到您正在构建的包的需求列表中。

关于delphi - 为什么编译器不能在我的包中包含外部 DCU?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8955880/

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