I'm getting the above error in the following unit (Delphi Alexandria) along with an "Unsatisfied forward or external declaration of 'CalculateInventoryColumnWidths'" error:
unit InventoryListing;
interface
uses
Classes, FireDac.Comp.Client, FMX.StdCtrls, FMX.frxClass,
AppGlobals;
procedure CalculateInventoryColumnWidths(var ColWidths: TColWidthsArray;
var TopTitles, MiddleTitles, BottomTitles: TStringList);
implementation
uses
SysUtils, StrUtils, System.Variants, System.UITypes,
Globals, Data;
type
TColWidthsArray = array of single;
var
fInventorySQL: string;
procedure CalculateInventoryColumnWidths(var ColWidths: TColWidthsArray;
var TopTitles, MiddleTitles, BottomTitles: TStringList);
begin
{implementation code}
end;
End.
I've searched the whole project for this procedure name and only found one instance that is the actual call to this procedure. I've tried removing the original unit from the project (that had all the details of the procedure) and created a brand new unit (above) to test with and still got the above errors.
I'm sure I'm doing something wrong here, but can't for the life of me figure it out. Can someone please help me see where I've gone wrong?
CodePudding user response:
The interface declaration references TColWidthsArray
, which is probably declared in AppGlobals, but the implementation references the local declaration of TColWidthsArray
given a few lines above. So both reference different types and thus don't match.