Start New Discussion within our Software Development Community

I am following some exercises in Delphi in a Nutshell from Ray Lischner. Very easy to follow and readable.
He was explaining how units are working the following code:

program Units1_1;
uses
  UnitA;

{$AppType Console}

begin
  WriteLn('Units 1_1 main program');
end.

unit UnitA;
interface
uses UnitB;
implementation
initialisation
  WriteLn('UnitA initialisation');
finalisation
  WriteLn('UnitA finalisation');
end.

unit UnitB;
interface
implementation
initialisation
  WriteLn('UnitB initialisation');
finalisation
  WriteLn('UnitB finalisation');
end.

But I get the error: that "it cannot resolve unit name UnitA in line 3", and when compiling: "[DCC Error] units.dpr(3): F1026 File not found: 'UnitA.dcu'"

Anyone knows what I am doing wrong?

Hmm somethimes I must realy lauch about myself, but Ive fix it! :)

I makes two mistakes, and the second one is maybe not a mistake.
1) it is initialization and finalization, I used an s.
2) I had to make two .pass files, the first one called Unit1 and the second Unit2.pass. And now it is working.

Anyway thanks. :icon_wink:

This question has already been answered. Start a new discussion instead.