Recent

Author Topic: Cross-compiling TRichMemo from Linux to Windows 32/64 bit  (Read 3153 times)

patyit

  • New Member
  • *
  • Posts: 27
Cross-compiling TRichMemo from Linux to Windows 32/64 bit
« on: August 15, 2021, 08:26:37 pm »
Hi !
I have a problem cross-compiling the application with TRichMemo from Linux to Win32 / 64.
Is this possible at all ? Are any of the dll-s missing ?
In the attached picture I show where the cross-compiling stops.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Cross-compiling TRichMemo from Linux to Windows 32/64 bit
« Reply #1 on: August 15, 2021, 11:16:19 pm »
the picture is nice, but what is the error message?
I'd think you might want to try the  latest sources from Github

timppl

  • Jr. Member
  • **
  • Posts: 80
Re: Cross-compiling TRichMemo from Linux to Windows 32/64 bit
« Reply #2 on: August 17, 2021, 08:01:27 am »
I have the same problem.
I am trying to build the richmemo package with fpc-3.2.2 and lazarus 2.0.12.

|The error messages I get are as follows
Quote
win32richmemoproc.pas(780,22) Error: Incompatible types: got "<address of function(PDWord;PByte;LongInt;var LongInt):DWord;StdCall>" expected "<procedure variable type of function(LongWord;PByte;LongInt;var LongInt):DWord;StdCall>"
and
Quote
win32richmemoproc.pas(804,22) Error: Incompatible types: got "<address of function(PDWord;PByte;LongInt;var LongInt):DWord;StdCall>" expected "<procedure variable type of function(LongWord;PByte;LongInt;var LongInt):DWord;StdCall>"
This still occurs with the latest code from Github.
BTW it builds fine with fpc 3.2.0.

Edited to add
The above errors are for linux->Win32.
If the function calls are changed to use longword instead of PDWord then it will all cross-compile for win32 but then fails for cross-compile to win64 with these errors
Quote
win32richmemoproc.pas(780,22) Error: Incompatible types: got "<address of function(LongWord;PByte;LongInt;var LongInt):DWord;StdCall>" expected "<procedure variable type of function(QWord;PByte;LongInt;var LongInt):DWord;StdCall>"

and
Quote
win32richmemoproc.pas(804,22) Error: Incompatible types: got "<address of function(LongWord;PByte;LongInt;var LongInt):DWord;StdCall>" expected "<procedure variable type of function(QWord;PByte;LongInt;var LongInt):DWord;StdCall>"
There is also an extra error
Quote
win32richmemoproc.pas(790,10) Error: Illegal type conversion: "LongWord" to "TStream"

Hope this helps
« Last Edit: August 17, 2021, 08:16:30 am by timppl »
Mageia 8 Linux on x86

paweld

  • Hero Member
  • *****
  • Posts: 970
Re: Cross-compiling TRichMemo from Linux to Windows 32/64 bit
« Reply #3 on: August 17, 2021, 08:41:59 am »
Best regards / Pozdrawiam
paweld

timppl

  • Jr. Member
  • **
  • Posts: 80
Re: Cross-compiling TRichMemo from Linux to Windows 32/64 bit
« Reply #4 on: August 19, 2021, 06:45:39 pm »
Hi

Thanks for that, it works OK now.
Mageia 8 Linux on x86

timppl

  • Jr. Member
  • **
  • Posts: 80
Re: Cross-compiling TRichMemo from Linux to Windows 32/64 bit
« Reply #5 on: August 24, 2021, 07:56:45 am »
I just rechecked this and I had the compiler set to 3.2.0 in the Lazarus options.  Setting it to 3.2.2 brings back the errors mentioned above. Any suggestions?

Tim
Mageia 8 Linux on x86

 

TinyPortal © 2005-2018