[Lazarus] Compile error on Win7 x64

Erwin van den Bosch erwin at deseine.nl
Wed Dec 15 17:00:33 CET 2010


Hello,

I'm getting compile errors on the current SVN on Windows 7 x64 / fpc 2.4.3.

Error: Can't overide method Realloc. No Int64 ...etc....

unit LCLMemManager;
...
...
{$IF FPC_FULLVERSION>20402}
   TStreamSizeType = PtrInt;
{$ELSE}
   TStreamSizeType = Longint;
{$IFEND}

   { TExtMemoryStream }

   TExtMemoryStream = class(TMemoryStream)
   protected
     function Realloc(var NewCapacity: TStreamSizeType): Pointer; override;
   public
     property Capacity;
   end;

In systemh.inc :

{$ifdef CPU64}
   SizeInt = Int64;
   SizeUInt = QWord;
   PtrInt = Int64;
   PtrUInt = QWord;
   ValSInt = int64;
   ValUInt = qword;
{$endif CPU64}

So PtrInt = Int64 but there is no method with an Int64 that can be 
overriden.

In classesh.inc :

TMemoryStream = class(TCustomMemoryStream)
protected
     function Realloc(var NewCapacity: Longint): Pointer; virtual;

Type is Longint. Not PtrInt or Int64.

Good luck fixing and happy xmas all!
Greetings  Erwin





More information about the Lazarus mailing list