Recent

Author Topic: Which include file?  (Read 2972 times)

RodneyK

  • New Member
  • *
  • Posts: 16
Which include file?
« on: December 28, 2010, 06:30:09 pm »
In converting a Delphi dll to the compiler couldn't find an include file filerec.inc required by SysUtils.

When I searched my hard drive I found two copies of filerec.inc, one in c:\lazarus\fpc\2.2.4\source\rtl\inc and the other in c:\lazarus\fpc\2.2.4\source\rtl\\objpas\classes.

Both define the FileRec record but differently.

In c:\lazarus\fpc\2.2.4\source\rtl\inc\filerec.inc the definition is:

type
  FileRec = Packed Record
    Handle    : THandle;
    Mode      : longint;
    RecSize   : SizeInt;
    _private  : array[1..3 * SizeOf(SizeInt) + 5 * SizeOf (pointer)] of byte;
    UserData  : array[1..32] of byte;
    name      : array[0..filerecnamelength] of char;
  End;

and in C:\lazarus\fpc\2.2.4\source\rtl\objpas\classes\filerec.inc

type
  FileRec = Packed Record
    Handle,
    Mode,
    RecSize   : longint;
    _private  : array[1..32] of byte;
    UserData  : array[1..16] of byte;
    name      : array[0..filerecnamelength] of char;
  End;

So which one should I use?


 

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: Which include file?
« Reply #1 on: December 28, 2010, 06:52:23 pm »
Neither, you should use the compiled sysutils.ppu.

 

TinyPortal © 2005-2018