#1 2020-10-21 04:28:59

sdsparkle
Member
Registered: 2019-12-15
Posts: 2

Compile SynPdf sample error on lazarus 2.0.10 + FPC 3.2.0

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!

Offline

#2 2020-10-21 07:04:47

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Compile SynPdf sample error on lazarus 2.0.10 + FPC 3.2.0

Lazarus/LCL is not supported for SynPdf.

Offline

#3 2020-10-21 10:48:00

sdsparkle
Member
Registered: 2019-12-15
Posts: 2

Re: Compile SynPdf sample error on lazarus 2.0.10 + FPC 3.2.0

Thanks ab, I accept.

Last edited by sdsparkle (2020-10-21 10:48:22)

Offline

#4 2020-10-21 11:17:59

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Compile SynPdf sample error on lazarus 2.0.10 + FPC 3.2.0

But any input is welcome, of course, to enhance it!
This is an Open Source project!
smile

Offline

#5 2020-10-21 15:19:41

mdbs99
Member
From: Rio de Janeiro, Brazil
Registered: 2018-01-20
Posts: 139
Website

Re: Compile SynPdf sample error on lazarus 2.0.10 + FPC 3.2.0

ab wrote:

Lazarus/LCL is not supported for SynPdf.

What you mean? On Github page says "Targets Delphi 5 up to Delphi 10.3 Rio (and latest version of FPC)..." so, it suppose to work on FPC, but you say LCL... I got confused here.

I've never used SynPdf so, sorry if my question sounds silly.

Offline

Board footer

Powered by FluxBB