[Lazarus] compiling PowerPDF on win32

Tobias Diekershoff tobias.diekershoff at gmx.net
Wed Jan 30 10:03:56 CET 2013


Dear list,

I have a problem compiling PowerPDF and seek your knowledge to solve it.

I've written a program on Linux where the PowerPDF works perfectly, but
when I tried to compile it on the machine at work (Windows XP) it gives
an

"Illegal type conversion 'Short String' to 'PChar'"

in powerpdf/pdftypes.pas lines 1007, 1010 and 1146 (see below).

I'm using Lazarus 1.0, FPC 2.6.0 and PowerPDF 0.9.9.

Thanks in advance
  Tobias

------ Code Sniplet (lines 1005 to 1011)----- 
  {$IFNDEF UNIX}
  Len := MultiByteToWideChar(0, CP_ACP,
    PChar(Value), Length(Value), nil, 0);
  GetMem(PW, Len * 2);
  Len := MultiByteToWideChar(0, CP_ACP,
    PChar(Value), Length(Value), PW, Len * 2);
  {$ELSE}

------ Code Sniplet (lines 1143 to 1147)----- 
// _WriteString
procedure _WriteString(const Value: string; AStream: TStream);
begin
  AStream.Write(PChar(Value)^, Length(Value));
end;




More information about the Lazarus mailing list