Recent

Author Topic: Error compiling LCL for WinCE  (Read 13132 times)

Legolas

  • Full Member
  • ***
  • Posts: 117
    • http://itaprogaming.free.fr
Error compiling LCL for WinCE
« on: September 21, 2006, 03:25:30 am »
I'm trying to recompile the LCL for WinCE but I get an error:
Code: [Select]

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


I have followed all steps I have found here. The raw crosscompiler works fine and the arm-wince binutils are called correctly.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2531
RE: Error compiling LCL for WinCE
« Reply #1 on: September 21, 2006, 12:08:48 pm »
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: [Select]
THandle = type PtrInt; into
Code: [Select]
THandle = {$ifdef windows}system.THandle;{$else}type PtrInt;{$endif}
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Legolas

  • Full Member
  • ***
  • Posts: 117
    • http://itaprogaming.free.fr
Error compiling LCL for WinCE
« Reply #2 on: September 21, 2006, 02:32:46 pm »
Sadly same error happens :(

The line is embedded in a ifdef block:
Code: [Select]

{$ifndef WINDOWS}
  {$IFDEF CPU64}
  // temp solution for 32bit system.Thandle
  THandle = type PtrInt;
  HANDLE = THandle;
  PHandle = ^THandle;
  {$ENDIF}
  ...


Maybe this block is never reached compiling wince?

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2531
Error compiling LCL for WinCE
« Reply #3 on: September 25, 2006, 11:59:19 am »
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.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Error compiling LCL for WinCE
« Reply #4 on: September 25, 2006, 02:20:42 pm »
Quote from: "Legolas"
Maybe this block is never reached compiling wince?


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?

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2531
Error compiling LCL for WinCE
« Reply #5 on: September 26, 2006, 10:50:56 am »
This block is only for non windows, so no need to fix that.
The only question is, how comes that there are 2 different THandle definitions ? Where are they defined.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Legolas

  • Full Member
  • ***
  • Posts: 117
    • http://itaprogaming.free.fr
Error compiling LCL for WinCE
« Reply #6 on: November 13, 2006, 02:05:27 pm »
I'm resuming this old post for an error I get compiling the lcl for wince. I use this
Code: [Select]

make lcl LCL_PLATFORM=wince PP=ppcrossarm.exe CPU_TARGET=arm OS_TARGET=wince

in order to get a cross lcl, but  I get this error:

Code: [Select]

make -C interfaces all
make[2]: Entering directory `/d/Apps/Lazarus/lcl/interfaces'
make -C wince all
make[3]: Entering directory `/d/Apps/Lazarus/lcl/interfaces/wince'
/usr/bin/rm.exe -f ../../units/arm-wince/wince/interfaces.ppu \
        ../../units/arm-wince/wince/interfaces.o
/d/freepascal/bin/i386-Win32/gmkdir.exe -p ../../units/arm-wince/wince
ppcrossarm.exe -Twince -Parm -XParm-wince- -Xc -Xr -gl -Fu../../units/arm-wince
-Fu. -FE. -FU../../units/arm-wince/wince -darm  interfaces.pp
PPU Loading d:\Apps\Lazarus\lcl\units\arm-wince\Graphics.ppu
PPU Loading d:\Apps\Lazarus\lcl\units\arm-wince\Graphics.ppu
Recompiling Graphics, checksum changed for IntfGraphics
PPU Loading d:\Apps\Lazarus\lcl\units\arm-wince\Graphics.ppu
Fatal: Can't find unit Graphics
Fatal: Compilation aborted
make[3]: *** [interfaces.ppu] Error 1
make[3]: Leaving directory `/d/Apps/Lazarus/lcl/interfaces/wince'
make[2]: *** [wince_all] Error 2
make[2]: Leaving directory `/d/Apps/Lazarus/lcl/interfaces'
make[1]: *** [interfaces] Error 2
make[1]: Leaving directory `/d/Apps/Lazarus/lcl'
make: *** [lcl] Error 2


The strange thing is that the file Graphics.ppu is exactly where the makefile expects to be.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2531
Error compiling LCL for WinCE
« Reply #7 on: November 14, 2006, 10:46:08 am »
I guess you are using svn fpc ? Then this is a known issue
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Error compiling LCL for WinCE
« Reply #8 on: November 14, 2006, 01:11:29 pm »
Just use one of the tested unstable revisions:

http://www.freepascal.org/wiki/index.php/Tested_Unstable_Revisions

Also, please mark on that wiki page that the revision you utilized does not work so other will know that. If it isn´t already marked.

Legolas

  • Full Member
  • ***
  • Posts: 117
    • http://itaprogaming.free.fr
Error compiling LCL for WinCE
« Reply #9 on: November 14, 2006, 02:45:06 pm »
The wince crosscompiler works fine (rev. 5370). I think the problem is in the lcl, because I can't compile it even if I use a fpc stable version.

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Error compiling LCL for WinCE
« Reply #10 on: November 14, 2006, 02:57:31 pm »
I don't understand. arm-wince is only supported in the unstable version. So clearly fpc cannot compile the LCL with the stable version.

What error do you get?

Legolas

  • Full Member
  • ***
  • Posts: 117
    • http://itaprogaming.free.fr
Error compiling LCL for WinCE
« Reply #11 on: November 14, 2006, 03:20:46 pm »
*me crying in a corner
Sorry, for "stable" I meant a tested unstable revision. And now I'm sure I need some sleep: I got these errors because I have put wrong paths in the fpc.cfg file :/

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Error compiling LCL for WinCE
« Reply #12 on: November 14, 2006, 03:22:08 pm »
No problem :-).

Take a good rest.

 

TinyPortal © 2005-2018