[fpc-pascal]Strange error

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Feb 27 12:01:29 CET 2003


On Thu, 27 Feb 2003 11:26:36 +0100
Peter Vreman <peter at freepascal.org> wrote:

> At 11:14 27-2-2003, you wrote:
> >Hi all,
> >
> >I'm trying to port the turbopower internet pro html viewer to lazarus. I
> >use the delphi mode and the fpc 1.0.7 [2003/02/21] for i386. Now there
> >are two strange error messages, and I neither know, what they mean, nor
> >how to get rid of:
> >
> >iphtml.pas(3662,3) Error: Symbol can't be published, can be only a class
> >iphtml.pas(3663,1) Error: Symbol can't be published, can be only a class
> 
> Can you try the 1.1 compiler, it has much more delphi compatiblity fixes.

I just updated my 1.1. compiler and found a bug. It does not like types like

HDC = type longword;
for methods.

For example:

---------------------------------
unit unit1; 

{$mode objfpc}{$H+}

interface

type
  HDC = type longword;
  
  TMyClass = class
    procedure A(DC: HDC);
  end;

implementation

procedure TMyClass.A(DC: HDC);
begin

end;

end.
---------------------------------



Mattias





More information about the fpc-pascal mailing list