[fpc-pascal] [libtar.pas]:Error: Illegal type conversion: "ShortString" to "^Char" without compilator options

Vincent Snijders vsnijders at quicknet.nl
Fri Oct 6 12:19:46 CEST 2006


TOUZEAU DAVID schreef:
> Dear
> 
> I would like to use some units developped from delphi/klyx with Lazarus 
> IDE On Linux.
> 
> It seems that there is some differences between delphi/freepascal 
> especially for longstring conversion.
> 
> Many times, i received this compilator error :
> 
> For example by using the LibTar.pas 
> (http://www.destructor.de/libtar/index.htm)
> 
> libtar.pas(355,8) Error: Illegal type conversion: "ShortString" to "^Char"
> 
> i fixed this error with  {$H+}{$LongString On} tokens
> 
> But is it this good way ??? is there an another solution ??

An alternative is to add {$mode delphi} to the source file or compile with -Sd 
compiler option.

Vincent



More information about the fpc-pascal mailing list