Error compiling VCL source code
I'm trying to install the VCL source for Delphi 1 from
the Delphi RAD pack. After adding the VCL directory
to the library search path and recompiling my program, I
get a compile error in VCL\CLASSES.PAS.
The error is in the function:
procedure TStream.WriteComponentRes(const ResName: string; Instance:
TComponent);
var
HeaderSize: Integer;
Origin, ImageSize: Longint;
Header: array[0..79] of Char;
begin
Byte((@Header[0])^) := $FF;
Word((@Header[1])^) := 10;
HeaderSize := StrLen(StrUpper(StrPLCopy(@Header[3], ResName, 63))) +
10;
Word((@Header[HeaderSize - 6])^) := $1030;
Longint((@Header[HeaderSize - 4])^) := 0;
WriteBuffer(Header, HeaderSize);
Origin := Position;
WriteComponent(Instance);
ImageSize := Position - Origin;
Position := Origin - 4;
WriteBuffer(ImageSize, SizeOf(Longint));
Position := Origin + ImageSize;
end;
And occurs in the second line of the function body:
Word((@Header[1])^) := 10;
The cursor is just before the semi-colon, and the error message is
Error 122 : Invalid variable reference
Any suggestions as to what the error means, and how I can get it to
compile? I don't understand how the VCL source code could be shipped
but not compile! This makes me think there is something else that I
haven't done, but I don't know what...
Thanks,
Francis Irving
Vega Group PLC.