[fpc-pascal] Error when translating a C header

Ludo Brands ludo.brands at free.fr
Wed Oct 5 13:57:27 CEST 2011


iup_isXkey is a C macro that is translated by h2pas into a function. You
can't assign a function to a const.

Delete line 248 and insert at line 258 the following ( just after function
iup_isXkey(_c : longint) : longint; ) :

function isxkey (_c : longint) : longint;

Begin
  Result:=iup_isXkey(_c);
End;

Ludo

> -----Message d'origine-----
> De : fpc-pascal-bounces at lists.freepascal.org 
> [mailto:fpc-pascal-bounces at lists.freepascal.org] De la part 
> de Luciano de Souza
> Envoyé : mercredi 5 octobre 2011 01:28
> À : FPC-Pascal users discussions
> Objet : Re: RE : [fpc-pascal] Error when translating a C header
> 
> 
> It's almost unblievable, but with your tip, I need to solve 
> one line to 
> compile 3744 lines!
> 
> iupkey.pp(248,25) Error: Illegal expression
> isxkey = iup_isXkey;
> 
> Do you have any idea why this error comes up?
> 
> 




More information about the fpc-pascal mailing list