Recent

Author Topic: Problems with TRect/TPoint  (Read 2342 times)

simone

  • Sr. Member
  • ****
  • Posts: 378
Problems with TRect/TPoint
« on: November 11, 2017, 05:09:37 pm »
Hello everyone. I'm trying to compile under Linux a project developed in Windows environment, but I get some compiler errors with TRect and TPoint. In particular with:

- TRect.CenterPoint function
- TRect.Width / Height properties
- TPoint <> operator

I read the warnings in typshrdh.inc and also some posts in the forum, but I did not understand how to solve the problem with Linux. Thanks in advance for the support.
Microsoft Windows 10 64 bit - Lazarus 2.0.10

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9235
  • FPC developer.
Re: Problems with TRect/TPoint
« Reply #1 on: November 11, 2017, 05:36:56 pm »
What is your compiler version? (on windows and linux?)

Handoko

  • Hero Member
  • *****
  • Posts: 4180
  • My goal: build my own game engine using Lazarus
Re: Problems with TRect/TPoint
« Reply #2 on: November 11, 2017, 05:45:42 pm »
@simone

As far as I know TRect.Width and TRect.Height are not available on Lazarus 1.6.0 FPC 3.0.0. But I'm sure it is available on Lazarus 1.6.4. It is time to update your Lazarus/FPC.

Read more (J-G's issue):
http://forum.lazarus.freepascal.org/index.php/topic,35313.msg257169.html#msg257169
« Last Edit: November 11, 2017, 05:47:46 pm by Handoko »

simone

  • Sr. Member
  • ****
  • Posts: 378
Re: Problems with TRect/TPoint
« Reply #3 on: November 11, 2017, 06:00:46 pm »
I'm using latest stable versions available on both platforms. In my tests with Linux Ubuntu I used Lazarus 1.6+dfsg-1. I'm developing my project under Windows with Lazarus 1.6.4.

« Last Edit: November 11, 2017, 06:02:17 pm by simone »
Microsoft Windows 10 64 bit - Lazarus 2.0.10

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9235
  • FPC developer.
Re: Problems with TRect/TPoint
« Reply #4 on: November 11, 2017, 06:06:07 pm »
I'm using latest stable versions available on both platforms. In my tests with Linux Ubuntu I used Lazarus 1.6+dfsg-1. I'm developing my project under Windows with Lazarus 1.6.4.

Well, then that is the problem, like both Handoko and I suspected. 1.6.4 packs FPC 3.0.2 which contains a cleanup of TRect.  1.6 packs 3.0.0 which doesn't.

The easiest solution is to migrate Linux to a newer, FPC 3.0.2 using version.

simone

  • Sr. Member
  • ****
  • Posts: 378
Re: Problems with TRect/TPoint
« Reply #5 on: November 11, 2017, 07:29:58 pm »
Thanks for the help. For laziness, on Linux I haved installed Lazarus with apt-get. I wrongly thought to get the latest version in this way...
Microsoft Windows 10 64 bit - Lazarus 2.0.10

 

TinyPortal © 2005-2018