[lazarus] FPC 1.1 can compile lazarus

Judison e Cássia jueca at brturbo.com
Wed Dec 18 14:42:30 EST 2002


On Wed, 18 Dec 2002 10:21:39 +0100
Mattias Gaertner <nc-gaertnma at netcologne.de> wrote:

> 
> Yes, it starts, but it can't read any file. Starting lazarus with gdb still
> shows:
> 
> (gdb) backtrace
> #0  $08252bea in _CLASSES_TSTREAM_$_SEEK$LONGINT$WORD ()
>                                          ^^^^^^^
> #1  $08252ac6 in _CLASSES_TSTREAM_$_SETPOSITION$INT64 ()
> #2  $08253a60 in _CLASSES_TMEMORYSTREAM_$_LOADFROMSTREAM$TSTREAM ()
> 
> ...
> 
> I downloaded a complete new fpc source and used a 'make clean linuxzip' (1.1
> was the current compiler). I hope this does not have any impact on the
> overloading logic of the compiler.
> 

Hum.... I have a problem with 1.1 reading files with TFileStream, I can't seek with a TFileStream.
(Can't get Size too, because GetSize uses seek)

I have some {$ifdef} to and some weird code to bypass this ;)

something like this:

while not Done do
try
  FStream.ReadByte(B);
  MStream.WriteByte(B);
except
  Done := True
end;

but, I don't recomend you to use this kind of thing, as lazarus are working fine in 1.0, 
every time I update FPC from cvs, I run some testfiles, one of these is:

program test_stream;

uses Classes;

var
  Stream: TStream;
begin
  Stream := TFileStream.Create('test_stream.pas', fmOpenRead);
  Stream.Seek(3,soFromCurrent);
  Stream.Free;
end.

When this works fine I'll send a message to this list ;)

BTW, you can use RegisterIntegerConsts/CursorToIdent/IdentToCursor ? (example: for TCursor)????

I hope I helped
Your friend
Judison






More information about the Lazarus mailing list