[Lazarus] Forward declaration not solved

Mattias Gaertner nc-gaertnma at netcologne.de
Fri Aug 9 10:22:51 CEST 2013


On Fri, 09 Aug 2013 10:04:01 +0200
Antonio Fortuny <a.fortuny at sitasoftware.lu> wrote:

> Hi Folks.
> 
> Moving some units from Delphi to FPC-Lazarus, the FPC compiler tells me 
> something I do not understand:
> Platform is Linux_x64,  Lazarus 1.0.8 FPC 2.6.2, gtk2
> Project options have been set to Obj Pascal (mdelphi removed)
> 
> interface
>      uses ...
> 
> [324]    function OpenLongFileName(const ALongFileName: String; const 
> SharingMode: Integer): THandle;
> 
> implementation
> 
> uses ...
> 
> function OpenLongFileName(const ALongFileName: String; const 
> SharingMode: Integer): THandle;
> begin
>    if not FileExists(ALongFileName) then begin
>      with TStringList.Create do try
>        Clear;
>        SaveToFile(ALongFileName);
>      finally
>        Free
>      end;
>    end;
>    Result := FileCreate(ALongFileName, fmOpenReadWrite, SharingMode);
> end;
> 
> compiler says:
> 
> clamav3.pas(324,12) Error: Forward declaration not solved 
> "OpenLongFileName(const AnsiString,const LongInt):QWord;"
> 
> Any comment ?

Maybe there is a unit in your implementation uses section that
redefines THandle.

Mattias




More information about the Lazarus mailing list