简体   繁体   English

Delphi:找不到.dcu,但是代码可在另一台计算机上工作

[英]Delphi : .dcu not found, but code works on another computer

I have been working on a Delphi code, which works on my computer (computer A). 我一直在研究Delphi代码,该代码可在我的计算机(计算机A)上使用。 I'm trying to execute the same code on another computer (computer B). 我正在另一台计算机(计算机B)上执行相同的代码。 So I went to that computer B, got the Delphi code via SVN, and tried building. 所以我去了那台计算机B,通过SVN获得了Delphi代码,并尝试构建。

But I got the error : 但是我得到了错误:

[Pascal Fatal Error] URoneParams.pas(7): F1026 File not found: 'CRBatchMove.dcu' [Pascal致命错误] URoneParams.pas(7):F1026找不到文件:'CRBatchMove.dcu'

I wanted to check if there was that .dcu on the computer A. But when I check my sources on that computer A, there are plenty of .dcu, but 'CRBatchMove.dcu' isn't one of them. 我想检查计算机A上是否存在.dcu。但是,当我在计算机A上检查源代码时,有很多.dcu,但“ CRBatchMove.dcu”不是其中之一。

Do you know : 你知道吗 :

  • how I can solve the .dcu error on computer B? 如何解决计算机B上的.dcu错误?
  • why the CRBatchMove.dcu is not present in the files in computer A? 为什么计算机A的文件中没有CRBatchMove.dcu?

Thank you very much for your help! 非常感谢您的帮助!

EDIT 1 Thank you so much to all for your quick answers! 编辑1非常感谢大家的快速回答!

@ MBo and David : The .pas is not present either, whether I look for it in the files of the computer A, or the files of the computer B. @ MBo和David :.pas也不存在,无论我是在计算机A的文件中还是在计算机B的文件中查找它。

@ MartynA : I did do a search in Files. @ MartynA :我确实在“文件”中进行过搜索。 On both computers, it returns the URParams.pas, which does use CRBatchMove. 在两台计算机上,它都返回URParams.pas,它确实使用CRBatchMove。 Is it a good sign? 这是一个好兆头吗? :) :)

What do you think I should do? 你觉得我该怎么做? Thank you again! 再次感谢你!

The unit CRBatchMove is part of the "Universal Data Access Components" by DevArt . CRBatchMove单元是DevArt的“通用数据访问组件”的一部分

You must install those components on the target computer as well. 您还必须在目标计算机上安装这些组件。 Note, that this is commercial software, so you need a valid license to install and use the component on multiple computers and with multiple people. 请注意,这是商业软件,因此您需要有效的许可才能在多台计算机上并由多人安装和使用该组件。

When installing the components, they are distributed as Packages ( *.bpl files). 安装组件时,它们作为软件包( *.bpl文件)分发。 A package can contain multiple compiled units. 一个包可以包含多个编译单元。 That is why you do not find a CRBatchMove.dcu file. 这就是为什么找不到CRBatchMove.dcu文件的原因。 It is contained inside an dac*.bpl (or similar) file. 它包含在dac*.bpl (或类似文件)文件中。

The only explanation I can think of for this is if your project is set up to use run-time packages and the code of CRBatchMove is compiled into one of the run-time packages your project depends upon. 我能想到的唯一解释是,如果您的项目设置为使用运行时程序包,而CRBatchMove的代码已编译为项目所依赖的运行时程序包之一。 If this is the case, then try copying the package(s) (.Bpl files) your project depends upon onto machine B, assuming your licence for the .Bpls permits this. 如果是这种情况,请尝试将您的项目所依赖的软件包(.Bpl文件)复制到计算机B上,前提是您的.Bpls许可证允许这样做。

If your project is a stand-alone application, then even if you can find a .Bpl file which contains the CRBatchMove code, copying it to machine B will not help you compile your project in machine B, because the Delphi compiler cannot extract the code from the .Bpl to compile it into your project. 如果您的项目是一个独立的应用程序,则即使您找到一个包含CRBatchMove代码的.Bpl文件,将其复制到计算机B也不会帮助您在计算机B中编译项目,因为Delphi编译器无法提取代码从.Bpl编译为您的项目。 The reason there is a difference between this and using run-tome packages is because when CRBatchMove is in one of the packages, the compiler does not need to generate its code to include in your project, only code to call the CRBatchMove code in the run-time package. 这与使用run-tome软件包之间存在差异的原因是,当CRBatchMove位于其中一个软件包中时,编译器不需要生成其代码以包含在您的项目中,只需在运行时调用CRBatchMove代码即可时间包。

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

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