Skip to content

Small Delphi incompatibility, FPC requires procvar (), Delphi not.

testparent.dpr

The attached program compiles in Delphi, and not FPC.

It calls inttostr(glgeterror) where glgeterror is a procvar (loaded from a DLL) and gets confused:

testparent.dpr(15,30) Error: Incompatible type for arg no. 1: Got "<procedure variable type of function:Word;CDecl>", expected "QWord"

The inttostr is required, directly doing writeln() is fine, so it is probably something to do with inttostr overload selection in combination with the procedures signature.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information