View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005480 | JEDI Code Library | JclFileUtils | public | 2011-02-14 15:16 | 2012-01-22 12:27 |
Reporter | CCRDude2 | Assigned To | outchy | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | Version 2.3 | ||||
Target Version | Fixed in Version | Version 2.3 | |||
Summary | 0005480: Double declaration of VersionResourceAvailable | ||||
Description | (tested using revision 3493, current at the time of writing) Compiling JclFileUtils.pas targetting x86_64-win64 fails at function VersionResourceAvailable, because two overloaded versions with the "same" parameter type (HWND and HMODULE - both are QWords on 64 bit) exist, which FPC, contrary to Delphi, does not seem to be able to overload. To verify, I temporarily changed HMODULE to Byte - with that different type, it compiled fine. I also verified that this compiles fine targetting i386-win32, where there seems to be a difference in types. Should this be regarded as a bug of the compiler, or the Jcl? | ||||
Additional Information | Free Pascal Compiler version 2.4.2 [2010/11/10] for x86_64 Copyright (c) 1993-2010 by Florian Klaempfl Target OS: Win64 for x64 Compiling C:\Development\Tools\Malware\spybotsd2\SDECon\src\SDECon64.lpr Compiling C:\Development\Tools\Malware\spybotsd2\SDECon\src\UnitContext.pas Compiling C:\Development\Units\snl\snlDebug.pas Compiling C:\Development\Units\snl\snlConsole.pas Compiling C:\Development\Units\snl\snlStrings.pas Compiling C:\Development\Units\Jcl-trunk\source\common\JclStrings.pas Compiling C:\Development\Units\Jcl-trunk\source\common\JclAnsiStrings.pas Compiling C:\Development\Units\Jcl-trunk\source\common\JclBase.pas Compiling C:\Development\Units\Jcl-trunk\source\common\JclResources.pas Writing Resource String Table file: JclResources.rst Compiling C:\Development\Units\Jcl-trunk\source\common\JclLogic.pas Compiling C:\Development\Units\Jcl-trunk\source\common\JclStreams.pas Compiling C:\Development\Units\Jcl-trunk\source\common\JclStringConversions.pas JclStringConversions.pas(2721,107) Warning: Local variable "UTF16Buffer" does not seem to be initialized Compiling C:\Development\Units\Jcl-trunk\source\common\JclCharsets.pas Compiling C:\Development\Units\Jcl-trunk\source\common\JclMath.pas Compiling C:\Development\Units\Jcl-trunk\source\common\Jcl8087.pas Compiling C:\Development\Units\Jcl-trunk\source\common\JclSynch.pas Compiling C:\Development\Units\Jcl-trunk\source\windows\JclWin32.pas Compiling C:\Development\Units\Jcl-trunk\source\windows\JclRegistry.pas Compiling C:\Development\Units\Jcl-trunk\source\common\JclStrings.pas Compiling C:\Development\Units\Jcl-trunk\source\common\JclWideStrings.pas Compiling C:\Development\Units\Jcl-trunk\source\common\JclUnicode.pas JclUnicode.pas(1050,14) Warning: An inherited method is hidden by "TWideStrings.Equals(TWideStrings):Boolean;" Compiling C:\Development\Units\Jcl-trunk\source\common\JclSysUtils.pas Compiling C:\Development\Units\Jcl-trunk\source\windows\JclConsole.pas Compiling C:\Development\Units\Jcl-trunk\source\common\JclFileUtils.pas JclFileUtils.pas(718,10) Error: Function is already declared Public/Forward "VersionResourceAvailable(const QWord):Boolean;" JclFileUtils.pas(718,10) Error: function header "VersionResourceAvailable" doesn't match forward : var name changes Window => Module JclFileUtils.pas(1054,1) Fatal: There were 2 errors compiling module, stopping Fatal: Compilation aborted Error: C:\Apps\Development\FPC\2.4.2\bin\i386-Win32\ppcrossx64.exe returned an error exitcode (normal if you did not spe cify a source file to be compiled) | ||||
Tags | No tags attached. | ||||
Fixed in GIT commit | |||||
Fixed in SVN revision | 3500 | ||||
IDE version | FPC | ||||
related to | 0005454 | feedback | Patch to allow SVN version of Jcl to compile with latest SVN version of FreePascal compiler. |
|
This could be solved using the patch to JclBase.pas available in 0005454, for easier reference quoted here: --- source/common/JclBase.pas Tue Jan 20 00:26:36 1970 +++ source/common/JclBase.pas Tue Jan 20 00:26:36 1970 @@ -321,6 +321,12 @@ function Addr64ToAddr32(const Value: TJclAddr64): TJclAddr32; function Addr32ToAddr64(const Value: TJclAddr32): TJclAddr64; +{$IFDEF FPC} +Type + HWND = type Windows.HWND; + HMODULE = type Windows.HMODULE; +{$ENDIF} + {$IFDEF SUPPORTS_GENERICS} //DOM-IGNORE-BEGIN |
|
I have the same issue using jcl-2.1.1.3970 source on i386-win32 platform using Lazarus 0.9.31/FPC 2.4.2. Compiler messages as follows: Hint: Start of reading config file C:\tools\lazarus931\fpc\2.4.2\bin\i386-win32\fpc.cfg Hint: End of reading config file C:\tools\lazarus931\fpc\2.4.2\bin\i386-win32\fpc.cfg Free Pascal Compiler version 2.4.2 [2011/02/09] for i386 Copyright (c) 1993-2010 by Florian Klaempfl Target OS: Win32 for i386 Compiling Jcl.pas Compiling C:\components\jcl-2.2.1.3970\source\common\JclAnsiStrings.pas Compiling C:\components\jcl-2.2.1.3970\source\common\JclStreams.pas Compiling C:\components\jcl-2.2.1.3970\source\common\JclMath.pas Compiling C:\components\jcl-2.2.1.3970\source\common\JclSynch.pas Compiling C:\components\jcl-2.2.1.3970\source\windows\JclRegistry.pas Compiling C:\components\jcl-2.2.1.3970\source\common\JclStrings.pas Compiling C:\components\jcl-2.2.1.3970\source\common\JclWideStrings.pas Compiling C:\components\jcl-2.2.1.3970\source\common\JclUnicode.pas C:\components\jcl-2.2.1.3970\source\common\JclUnicode.pas(1050,14) Warning: An inherited method is hidden by "TWideStrings.Equals(TWideStrings):Boolean;" Compiling C:\components\jcl-2.2.1.3970\source\common\JclSysUtils.pas Compiling C:\components\jcl-2.2.1.3970\source\windows\JclConsole.pas Compiling C:\components\jcl-2.2.1.3970\source\common\JclFileUtils.pas C:\components\jcl-2.2.1.3970\source\common\JclFileUtils.pas(717,10) Error: Function is already declared Public/Forward "VersionResourceAvailable(const LongWord):Boolean;" C:\components\jcl-2.2.1.3970\source\common\JclFileUtils.pas(717,10) Error: function header "VersionResourceAvailable" doesn't match forward : var name changes Window => Module C:\components\jcl-2.2.1.3970\source\common\JclFileUtils.pas(1053,1) Fatal: There were 2 errors compiling module, stopping ----- Using above patch for JclBase allows the compilation of the package to continue past this error. |
|
This is fixed in revision 3500. Thanks for the report. The warning about "TWideStrings.Equals(TWideStrings):Boolean;" should be fixed as well but I do not have FPC right now. |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-02-14 15:16 | CCRDude2 | New Issue | |
2011-02-14 15:16 | CCRDude2 | IDE version | => FPC |
2011-02-15 08:42 | CCRDude2 | Relationship added | related to 0005454 |
2011-02-15 08:47 | CCRDude2 | Note Added: 0018340 | |
2011-02-15 19:54 | malsoft | Note Added: 0018375 | |
2011-02-22 20:49 | outchy | Note Added: 0018405 | |
2011-02-22 20:49 | outchy | Assigned To | => outchy |
2011-02-22 20:49 | outchy | Status | new => feedback |
2012-01-22 12:27 | outchy | Fixed in revision | => 3500 |
2012-01-22 12:27 | outchy | Status | feedback => resolved |
2012-01-22 12:27 | outchy | Fixed in Version | => Version 2.3 |
2012-01-22 12:27 | outchy | Resolution | open => fixed |