last trunk lazarus (42698) not works on windows
Original Reporter info from Mantis: zamtmn @zamtmn
-
Reporter name: Andrey Zubarev
Original Reporter info from Mantis: zamtmn @zamtmn
- Reporter name: Andrey Zubarev
Description:
Error on compile with fpc 2.7.1
E:\lazarus\components\lazutils\winlazfileutils.inc(536,20) Error: Incompatible types: got "WIN32_FIND_DATAW" expected "WIN32_FIND_DATAA"
function FindFirstWide(const Path: string; Attr: Longint; out Rslt: TSearchRec): Longint;
var
find: TWIN32FINDDATAW;
begin
Rslt.Name:=Path;
Rslt.Attr:=attr;
Rslt.ExcludeAttr:=(not Attr) and ($1e);
{ $1e = faHidden or faSysFile or faVolumeID or faDirectory }
{ FindFirstFile is a Win32 Call }
Rslt.FindHandle:=Windows.FindFirstFileW( PWideChar(UTF8Decode(Path)),find);
If Rslt.FindHandle=Windows.Invalid_Handle_value then
begin
Result:=GetLastError;
Exit;
end;
{ Find file with correct attribute }
{$IFNDEF FindData_W}
FindWideToAnsi(find, Rslt.FindData);
{$ELSE}
Rslt.FindData := find; <<-----------------------here
{$IFEND}
Result := FindMatch(Rslt);
end;
If i comment this line, compiles fine, but when start can not find the compiler, make, etc.
Mantis conversion info:
- Mantis ID: 24985
- OS: Windows7x64
- Platform: Win32