Simplified example: Re: [lazarus] Stange error message

Marc Weustink weus at quicknet.nl
Mon Jun 26 18:58:34 EDT 2000


At 22:04 23-06-2000 +0200, Peter Vreman wrote:

>>program testclass;
>
>Fixed

Allmost, this one was harder to pinpoint

Try the following example.
NOTE 1: Both items of MyRec are important. (one item seems ok)
NOTE 2: After a second compile the problem is gone.

------------------------------------

program testclass;

{$mode objfpc}

uses
   MyUnit;

type
   TMyRec = record
     MyItem: Integer;
     MyOtherItem: Integer;
   end;

begin
end.

------------------------------------

unit MyUnit;

{$mode objfpc}

interface

uses
   Classes;

implementation

type
   TMyClass = class(TPersistent);

end.

------------------------------------

marc:~/fpc/lazarus/test$ rm *.o
marc:~/fpc/lazarus/test$ ppc386 testclass.pp
Target OS: Linux for i386
Compiling testclass.pp
Compiling myunit.pp
Assembling (pipe) myunit.s
testclass.pp(12,3) Error: Symbol can't be published, can be only a class
testclass.pp(17) Fatal: There were 1 errors compiling module, stopping
marc:~/fpc/lazarus/test$







More information about the Lazarus mailing list