Zitat von Osvaldo Filho <[email protected]>:
Ubuntu 9.10
Lazarus 0.9.29 revision 23749M (svn)
FPC 2,4,1 (svn)
Why do I have this error:
/mnt/laz_componentes/extpascal/CGIGateway.dpr(255,29) Error:
Incompatible type for arg no. 2: Got "Dynamic Array Of PChar",
expected "PPChar"
because "array of pchar;" is a Dynamic Array Of PChar and that is more
than a PPChar.
=============
{
Executes a program file
@param Prog Executable file with path
@return True if succeded else False
}
function Exec(Prog : string) : boolean;
{$IFNDEF MSWINDOWS}
var
ArgV : array of pchar;
{$ENDIF}
[...]
SetLength(ArgV, 2);
ArgV[0] := pchar(Prog);
ArgV[1] := nil;
FpExecv(Prog, ArgV);<<< Error
[...]
Use
FpExecv(Prog, PPChar(@ArgV[0]));
Mattias
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus