[lazarus] Stange error message
Marc Weustink
weus at quicknet.nl
Thu Jun 22 16:23:18 EDT 2000
At 16:55 22-06-2000 +0200, Michael Van Canneyt wrote:
> > Marc Weustink wrote:
> > >
> > > Unlike Delphi, FPC doesn't like this, it wants an end statement after a
> > > class. It should be declared as:
> > >
> > > type
> > > TMyControl = class(TControl)
> > > end;
>
>No it does not. The following compiles fine:
>
>unit testc;
>
>interface
>
>Type
> TMyClass = Class (Tobject);
>
>Implementation
>
>end.
........
Ofcourse does this work. Thats the reason why I found it a strange error
message. Try the following code.
Marc
-----------------------------------
unit testclass;
{$mode objfpc}
interface
uses
Classes;
type
TMyClass = class(TObject)
procedure MyProc;
end;
implementation
type
TMyOtherClass = class(TPersistent);
procedure TMyClass.MyProc;
var
MyImportantVar: Integer;
begin
end;
end.
-----------------------------------
marc:~/fpc/lazarus/test$ ppc386 testclass.pp
Target OS: Linux for i386
Compiling testclass.pp
testclass.pp(23,1) Error: Symbol can't be published, can be only a class
testclass.pp(27) Fatal: There were 1 errors compiling module, stopping
More information about the Lazarus
mailing list