德尔福:缺少Dcu [英] Delphi: Missing Dcu

查看:183
本文介绍了德尔福:缺少Dcu的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


[DCC致命错误] Unit1.pas(7):F1026找不到文件:'MyBitBtn.dcu'

[DCC Fatal Error] Unit1.pas(7): F1026 File not found: 'MyBitBtn.dcu'

Unit1是用于测试目的的VCL表单。

Unit1 is a VCL Form for test purposes.

我已经安装了一个包含从TBitBtn派生的自定义组件的设计时间包。我可以在Delphi IDE中加载MyBitBtn,加载我在设计时编码的自定义图像,似乎至少在视觉上它工作正常。我尝试编译测试项目时收到上述编译时错误。

I have installed a design time package which contains a custom component that derived from TBitBtn. I can load the MyBitBtn in the Delphi IDE, load up the custom images I coded in design time and it seems like it works fine, at least visually. I get the above compile time error when I try to compile the test project.

我有一个包组,具有一个设计时间包和一个运行时包。设计时间包注册组件,Runtime包继承了TBitBtn,并具有自定义代码。 设计时间包包含需求部分中的RunTime DCP文件

I have a package group that has one design time package and one run time package. Design time package registers the component and Runtime package inherits the TBitBtn and has the custom code in it. The design time package contains the RunTime DCP file in the requires section.

当我在测试表单上插入自定义按钮时,IDE会创建MyBitBtn文件的USES子句。那个文件显然是找不到的。不应该是安装的软件包的一部分?

The moment I insert the custom button on the test form, IDE creates the USES clause for MyBitBtn file. And that file apparently can't be found. Shouldn't that be part of the package installed?

推荐答案

最有可能你没有设置单位输出目录选项在你的运行时包,所以包.dcu不可用;我通常将它设置为 $(BDSCOMMONDIR)\Dcp ,没有任何问题。

Most probable you did not set 'Unit output directory' option in your runtime package, so package .dcu's are not available; I usually set it to $(BDSCOMMONDIR)\Dcp and have no problems.

通常,如果您希望您的软件包可用于任何项目,则应通过全局IDE库路径提供运行时包:

Generally, the .dcu's of a runtime package should be available via global IDE library path if you want your package to be available to any project:

您应该使用一个现有路径或添加自己的路径。

You should either use one of the existing paths or add your own.

这篇关于德尔福:缺少Dcu的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆