简体   繁体   English

在自定义组件中找不到 Designintf.dcu

[英]Designintf.dcu not found in custom component

I am here converting some customize delphi component to latest delphi xe5.我在这里将一些自定义的 delphi 组件转换为最新的 delphi xe5。 I already build it in delphi xe5 ide and where desgninf i replaced with designintf and design editor.我已经在delphi xe5 ide中构建了它,并且我用designintf和设计编辑器替换了desgninf。 i also include designide.dcp in reference .我还在参考中包含了 designide.dcp。 it build and install sucessfully .它构建和安装成功。 but there some packages while i try to use and complie error like designinf.dcu not found come .但是在我尝试使用和编译时出现了一些软件包,例如没有找到 designinf.dcu 之类的错误。

i study on internet for solution as after delphi 6 their delphi not redistributed their design time packges.我在互联网上研究解决方案,因为在 delphi 6 之后,他们的 delphi 没有重新分发他们的设计时间包。 but because it in delphi 5 and complex one i can invest time on dividing design and runtime code and test it.但是因为它在 delphi 5 和复杂的版本中,我可以花时间划分设计和运行时代码并对其进行测试。

kindly any alternative solution.请提供任何替代解决方案。

thanks abhishek mestri感谢 abhishek mestri

For anyone that's having difficulty linking DesignIntf and/or DesignEditors , try adding designide.dcp to the package's Requires folder.对于在链接DesignIntf和/或DesignEditors 时遇到困难的任何人,请尝试将 designide.dcp 添加到包的Requires文件夹中。 For example, the dcp for XE3 can be found in:例如,XE3 的 dcp 可以在以下位置找到:

C:\Program Files (x86)\Embarcadero\RAD Studio\10.0\lib\win32\release

Such errors often happen if you take very old (Delphi 6 or before) component code and try to compile it in a newer compiler.如果您使用非常旧的(Delphi 6 或更早版本)组件代码并尝试在较新的编译器中编译它,则经常会发生此类错误。

The unit designintf.dcu and some other units are only available to packages that link with the IDE, ie only for design time code.单元designintf.dcu和其他一些单元仅可用于与 IDE 链接的包,即仅用于设计时代码。 In older versions of Delphi, you would get the source code, but not anymore, because the packages in which these units are are not redistributable, they are exclusively meant for the IDE.在旧版本的 Delphi 中,您将获得源代码,但不再获得源代码,因为这些单元所在的包不可再分发,它们专供 IDE 使用。

So at the time of Delphi 6 and 7, youw were warned to separate code that would be used at runtime and code that could only be used at designtime, by the IDE.因此,在 Delphi 6 和 7 的时候,IDE 警告您将运行时使用的代码和只能在设计时使用的代码分开。 The old component you are using did not do that, yet.您正在使用的旧组件还没有这样做。

So try to find out which code actually requires designintf.dcu , move that code to a separate unit, and make it use the original unit.因此,尝试找出实际需要designintf.dcu代码,将该代码移至单独的单元,并使其使用原始单元。 The original unit is now the runtime code, can be used everywhere, and doesn't need designintf.dcu .原始单元现在是运行时代码,可以随处使用,不需要designintf.dcu The other unit is the designtime unit and should only be linked into the package used to install the component in the IDE.另一个单元是设计时单元,应该只链接到用于在 IDE 中安装组件的包中。

More info: Delphi FAQ更多信息: Delphi 常见问题

I already build it in delphi xe5 ide and where desgninf i replaced with designintf and design editor.我已经在delphi xe5 ide中构建了它,并且我用designintf和设计编辑器替换了desgninf。

but there some packages while i try to use and complie error like designinf.dcu not found come但是在我尝试使用和编译错误时有一些包,比如没有找到 designinf.dcu 来

Based on your limited description, it seems to me that some of your packages might still expect to find designinf.pas file which you renamed to designintf.pas.根据您的有限描述,在我看来,您的某些软件包可能仍希望找到您重命名为 designintf.pas 的 designinf.pas 文件。

So I would go recheck all of the packages which don't compile so that they try to include the correct file and not the one which no longer exists.因此,我会重新检查所有未编译的包,以便它们尝试包含正确的文件,而不是不再存在的文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM