[fpc-devel]Possible Compiler bug in FPC 1.04 under Win32?

murphy murphy at dev0.de
Wed Jan 17 12:58:15 CET 2001


Hi!

When i compile the attached source code i got some strange 
errors.

--snip--
Compiling devpdflib.pas
devpdflib.pas(88,27) Error: Incompatible types: got "<procedure variable type of function():SmallInt;ClearStack;Cdecl>" expected "SMALLINT"
devpdflib.pas(104,27) Error: Incompatible types: got "<procedure variable type of function():SmallInt;ClearStack;Cdecl>" expected "SMALLINT"
devpdflib.pas(120,14) Error: Incompatible types: got "<procedure variable type of function():^TPDF;ClearStack;Cdecl>" expected "PPDF"
devpdflib.pas(138) Fatal: There were 3 errors compiling module, stopping
--snip--

The source code is for first error:

type
  TPDF_get_majorversion =function:Integer cdecl;
var
  FPDF_get_majorversion :TPDF_get_majorversion;

function PDF_get_majorversion:Integer;
begin
  PDF_get_majorversion:=FPDF_get_majorversion;
end;

The function call returns an error.
Does anyone knows why?

Please help me as fast as you can...

Bye, Torsten

_,,,o¿o,,,_




More information about the fpc-devel mailing list