1
votes

I am trying to fix an old Delphi software. But i haven't used Delphi very long time. when i try to run the software :

 [Fatal Error] CHAINU.PAS(10): File not found: 'TCustAbs.dcu'

In main POHook.dpr file

 Uses Classes, Dialogs, Forms, IniFiles, SysUtils, Windows, CustAbsU,
 Menus, EntMenuU, TCustAbs;

There is a TCUSTABS.PAS file inside the folder called BaseFile, Basefile Folder and POHOOK.dpr are in the same folder.

[Fatal Error] CHAINU.PAS(10): File not found: 'TCustAbs.dcu' Where is this .dcu file?

1
Use the Project->Add to Project menu option to locate the TCustAbs.pas file, so the project knows where to fnd that file. After that, it will generate the .TCustAbs.dcu when the project is compiled.nolaspeaker
If you haven't used Delphi for a very long time, perhaps you should consider some revision, rather than expecting immediate success. My advice is to spend some time re-learning the tools necessary to do the job.David Heffernan

1 Answers

3
votes

There is a TCUSTABS.PAS file inside the folder called BaseFile, Basefile Folder and POHOOK.dpr are in the same folder.

The compiler isn't going to automagically search folders for you unless you specifically add the folder to the project's search path, which is generally a bad idea unless it's a third party library. (Which it doesn't appear to be, if it's in the same folder as your DPR.) What would be better is to add the TCUSTABS.PAS file to the project itself. Then the compiler will have no trouble finding it.