Recent

Author Topic: [ SOLVED ] BGRABITMAP Compile problem with latest trunk  (Read 4018 times)

josh

  • Hero Member
  • *****
  • Posts: 786
[ SOLVED ] BGRABITMAP Compile problem with latest trunk
« on: November 26, 2015, 03:39:00 pm »
Hi

Just installed latest LAZ (1.5)+FPC 3.1.1  from trunk, and BGRABITMAP will not compile.

It errors here.

bgracanvas2d.pas(370,21) Error: Operator is not overloaded: "TPointF" + "TPointF"

ANy Ideas?

Josh
« Last Edit: November 30, 2015, 02:24:06 pm by josh »
Development Installation Lazarus 1.3, FPC 2.7.1,Windows 7/8 32/64, OSX, *nix

Test Environment Lazarus & FPC Trunk on Windows and OSX (Cocoa Mainly on OSX). Testing also Crosscompile windows to OSX.. 
Any posts made from 2015 will be based on Lazarus Trunk.

circular

  • Hero Member
  • *****
  • Posts: 3440
    • Personal webpage
Re: BGRABITMAP Compile problem with latest trunk
« Reply #1 on: November 26, 2015, 07:16:37 pm »
Yes, that's a known problem.

See here:
https://github.com/bgrabitmap/lazpaint/issues/5

The fix is to change the definition of TPointF in
https://sourceforge.net/p/lazpaint/code/HEAD/tree/bgrabitmap/geometrytypes.inc

Code: [Select]
{$ifdef VER3_1_1 }
TPointF = Types.TPointF;
{$else}
TPointF = packed record x, y: single;
end;
{$endif}

Conscience is the debugger of the mind

josh

  • Hero Member
  • *****
  • Posts: 786
Re: BGRABITMAP Compile problem with latest trunk
« Reply #2 on: November 26, 2015, 07:49:48 pm »
Hi Circular,

Again thanks for your prompt reply; everything is now working perfectly.  :)

Josh
Development Installation Lazarus 1.3, FPC 2.7.1,Windows 7/8 32/64, OSX, *nix

Test Environment Lazarus & FPC Trunk on Windows and OSX (Cocoa Mainly on OSX). Testing also Crosscompile windows to OSX.. 
Any posts made from 2015 will be based on Lazarus Trunk.

wp

  • Hero Member
  • *****
  • Posts: 7520
Re: [ SOLVED ] BGRABITMAP Compile problem with latest trunk
« Reply #3 on: January 29, 2016, 11:53:43 pm »
I just checked my version, this bug is still there. Isn't there anybody around here who can commit this modification?
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

circular

  • Hero Member
  • *****
  • Posts: 3440
    • Personal webpage
Re: [ SOLVED ] BGRABITMAP Compile problem with latest trunk
« Reply #4 on: January 30, 2016, 05:38:15 am »
Hi!

I have my Internet connection again, so I updated on SVN.

Regards
Conscience is the debugger of the mind

wp

  • Hero Member
  • *****
  • Posts: 7520
Re: [ SOLVED ] BGRABITMAP Compile problem with latest trunk
« Reply #5 on: January 30, 2016, 10:43:00 am »
I failed to update my 3.1.1, so, I am not 100% sure if this issue still exists: The compiler now complains about some calls to the "round" function because somebody has attached a "round" function to the record type "TPointF", and this conflicts with the system call here. Add a "system." at these places or avoid the "with" construct here. See attached patch.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

circular

  • Hero Member
  • *****
  • Posts: 3440
    • Personal webpage
Re: [ SOLVED ] BGRABITMAP Compile problem with latest trunk
« Reply #6 on: January 30, 2016, 07:57:06 pm »
Oh I see. Thanks! Applied as well on SVN
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018