AliAzra
AliAzra

Reputation: 919

Delphi Undeclared identifier

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?

Upvotes: 1

Views: 1590

Answers (1)

Mason Wheeler
Mason Wheeler

Reputation: 84540

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.

Upvotes: 4

Related Questions