[Lazarus] compiling PowerPDF on win32

Michael Van Canneyt michael at freepascal.org
Wed Jan 30 11:40:31 CET 2013



On Wed, 30 Jan 2013, silvioprog wrote:

> 2013/1/30 Tobias Diekershoff <tobias.diekershoff at gmx.net>
>       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; 
> 
> 
> Hm... I'm using PowerPDF fine on Windows 7.
> 
> I even managed to remove the dependency of LCL to be able to create PDFs and CGI applications:

Interesting.

Do you think the basics could be included in the standard FPC distribution ?

Michael.


More information about the Lazarus mailing list