Small Delphi incompatibility, FPC requires procvar (), Delphi not.
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.