#2 mORMot 1 » Compile SynPdf sample error on lazarus 2.0.10 + FPC 3.2.0 » 2020-10-21 04:28:59

sdsparkle
Replies: 4

I compile mORMot\SQLite3\Samples\05 - Report created from code on lazarus 2.0.10 + FPC 3.2.0, and report Error wrong number of parameters specified for call to "GetFontData".

The error code in SynPdf.pas as follow:

function GetTTFData(aDC: HDC; aTableName: PAnsiChar; var Ref: TWordDynArray): pointer;
var L: cardinal;
begin
  result := nil;
  L := GetFontData(aDC,PCardinal(aTableName)^,0,nil,0);
  if L=GDI_ERROR then
    exit;
  SetLength(ref,L shr 1+1);
  if GetFontData(aDC,PCardinal(aTableName)^,0,pointer(ref),L)=GDI_ERROR then
    exit;
  result := pointer(ref);
  SwapBuffer(Result,L shr 1);
end;

       

SynPdf.pas(2963,8) Error: Wrong number of parameters specified for call to "GetFontData"
font.inc(135,10) Error: Found declaration: GetFontData(QWord):<record type>;
SynPdf.pas(2967,6) Error: Wrong number of parameters specified for call to "GetFontData"
font.inc(135,10) Error: Found declaration: GetFontData(QWord):<record type>;

I guess the compiler use wrong "GetFontData" in font.inc not in func.inc, How can i fix it?

I use the code dowloaded from https://github.com/synopse/mORMot/archive/master.zip.

Thanks alots!

Board footer

Powered by FluxBB