[Lazarus] Forward declaration not solved

Antonio Fortuny a.fortuny at sitasoftware.lu
Fri Aug 9 11:42:45 CEST 2013

Le 09/08/2013 11:29, Sven Barth a écrit :
> Am 09.08.2013 11:15, schrieb Antonio Fortuny:
>> Le 09/08/2013 10:22, Mattias Gaertner a écrit :
>>> 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.
>> On the declaration (following Ctrl + mouse left click) leads to 
>> QWord: THandle --> PtrUInt (LCLType) --> QWord (systemh.inc)
>> on the implementaion: THnadle --> System.THandle (sysutilf.inc) --> 
>> THandle --> LongInt (sysosh.inc)
>> Well done. In the interface units uses declares:   LCLIntf, LCLType,  
>> LMessages,  FileUtil;
>> In the implemantaion uses declares   Classes,  sysutils;
>> OK. It is a Delphi conversion and I didn't pay enough attention to it
>> But the isn't there some ambiguity between LCL declarations and FPC 
>> declarations for what is obviously the same type ?
> Might be related to the fact that the LCL often uses the THandle to 
> store a pointer on non-Windows widgetsets. On e.g. Linux x86_64 
> THandle is defined as a longint because of file operations... There 
> might not be a solution with which anyone can live :/
OK, I think I can live with this. But I think it would be preferable to 
use a distinct type name. As I can understand that the system unit is 
quite close to the OS definitions it should not be superseded by Lazarus.
Anyway, thanks for the explantion Sven.

> Regards,
> Sven
> -- 
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Sita Software
*Antonio Fortuny*
Senior Software engineer

220, avenue de la Liberté
L-4602 Niederkorn
Tel.: +352 58 00 93 - 93
www.sitasoftware.lu <http://www.sitasoftware.lu>
Your IT Partner

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20130809/defbb635/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ebedgiig.jpg
Type: image/jpeg
Size: 2306 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20130809/defbb635/attachment-0006.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dcbfccig.jpg
Type: image/jpeg
Size: 921 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20130809/defbb635/attachment-0007.jpg>

More information about the Lazarus mailing list