Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-10

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

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

TOUZEAU DAVID

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 ??

Best regards.

David Touzeau -------------------------- Linux Ubuntu Dapper 6.0.6 FreePascal-Lazarus,perl,delphi,php icq:160018849
Vincent Snijders
to TOUZEAU DAVID
TOUZEAU DAVID wrote 18 lines
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

TOUZEAU DAVID
to Vincent Snijders

Many thanks Vincent

the {$mode delphi} is a good way...

Vincent Snijders wrote 26 lines
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
David Touzeau -------------------------- Linux Ubuntu Dapper 6.0.6 FreePascal-Lazarus,perl,delphi,php icq:160018849