Forum > PDAs and Smartphones
Error compiling LCL for WinCE
Legolas:
I'm trying to recompile the LCL for WinCE but I get an error:
--- Code: ---
WinCEInt.pp(123,21) Error: Overridden methods must have the same return type: "TWidgetSet.GetStockObject(LongInt):DWord" is overriden by "TWinCEWidgetSet.GetStockObject(LongInt):LongInt" which has another return type
--- End code ---
I have followed all steps I have found here. The raw crosscompiler works fine and the arm-wince binutils are called correctly.
Marc:
The LCL THandle is defined different than the windows THandle. I'll try to fix that.
For the time being, you can change in lcl\lcltype.pas the line
--- Code: ---THandle = type PtrInt;
--- End code ---
into
--- Code: ---THandle = {$ifdef windows}system.THandle;{$else}type PtrInt;{$endif}
--- End code ---
Legolas:
Sadly same error happens :(
The line is embedded in a ifdef block:
--- Code: ---
{$ifndef WINDOWS}
{$IFDEF CPU64}
// temp solution for 32bit system.Thandle
THandle = type PtrInt;
HANDLE = THandle;
PHandle = ^THandle;
{$ENDIF}
...
--- End code ---
Maybe this block is never reached compiling wince?
Marc:
ah, ok
I only had a quick look, didn't see the surrounding ifndef.
I've to look later what is going on, but from this I think the windows handle is used and that one should be the sam ein all units.
Somehow thandle gets redifined somewhere.
felipemdc:
--- Quote from: "Legolas" ---Maybe this block is never reached compiling wince?
--- End quote ---
Sure it isn't reached, that block has a {$ifndef WINDOWS}
Windows CE defines Windows too.
It could try to fix it, but it's a little hard to me since I don't have a win64 system, and I don't remember this problem on win32. Was it introduced recently?
Navigation
[0] Message Index
[#] Next page