We help IT Professionals succeed at work.

Location of DCU files

QC20N
QC20N asked
on
Sometime I find a compnent I install and all seems to work ok.

But when I compile I get an error:

file not found *.dcu

What can I do?

I have Delphi Pro XE2.
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2011
Commented:
Normally the DCU files are generated from the PAS files after the PAS files get compiled.

So if you got "File not found File1.DCU" then you should start looking for "File1.PAS".

But also the DCU files can be provided instead of the PAS files if the source code is to be protected.

So in your case start searching in the component directory for the file(s) that you get notified that they are not found, but make sure to look for the files by both extensions PAS and DCU, if non is found then the component is missing some files and they must exist in order to install or use the component successfully.

Do you have a specific component that you experienced this issue with?
Emmanuel PASQUIERFreelance Project Manager
CERTIFIED EXPERT
Top Expert 2010
Commented:
it is also possible that you have been given Packages Libraries (which are essentially compiled units regrouped in a functional entity).
Packages Libraries are :
- .BPL files (= advanced DLL needed to run the application that uses them)
- .DCP files (Delphi Compiled Packages), generated when you compile a BPL, that your other packages or application 'Requires' to be compiled.
If you have both files, you don't actually need the .DCU (they are regrouped in the DCP), so it might be that a 3rd party component is only shipped in this BPL+DCP form and yet the compiler will ask for .DCU file if it can't find the .DCP file in its search path.

between JimiX explanation and mine, you have all the possible generic scenarios, but to help you more we would need the name of the unit missing and if it's not a standard delphi unit, the name of the 3rd party editor (and/or commercial package name)
Mike McCrackenSenior Consultant
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2013

Commented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.