简体   繁体   中英

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). I'm trying to execute the same code on another computer (computer B). So I went to that computer B, got the Delphi code via SVN, and tried building.

But I got the error :

[Pascal Fatal Error] URoneParams.pas(7): F1026 File not found: '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.

Do you know :

  • how I can solve the .dcu error on computer B?
  • why the CRBatchMove.dcu is not present in the files in computer A?

Thank you very much for your help!

EDIT 1 Thank you so much to all for your quick answers!

@ 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.

@ MartynA : I did do a search in Files. On both computers, it returns the URParams.pas, which does use 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 .

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). A package can contain multiple compiled units. That is why you do not find a CRBatchMove.dcu file. It is contained inside an dac*.bpl (or similar) file.

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. 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.

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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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