Recent

Author Topic: [SOLVED] Lazarus 64bit  (Read 8984 times)

caleb9

  • Jr. Member
  • **
  • Posts: 51
[SOLVED] Lazarus 64bit
« on: March 31, 2011, 10:14:40 am »
Hi,
sorry if this has been asked before but I can't seem to find a clear answer on the Net except of this possibly outdated mail-archive http://www.mail-archive.com/lazarus@lists.lazarus.freepascal.org/msg09030.html. So is it possible to compile 64 bit GUI(!) applications with Lazarus on Mac OS X?
Thanks in advance.

Edit: found my answer here http://www.lazarus.freepascal.org/index.php/topic,12589.0.html.

Edit: Now that I think of it I'm starting to doubt if it makes sense anyway. Experimenting a bit with SizeOf I recalled that most of the primitive types are the same size despite platform (size of Integer is controlled by $MODE) - FPC is platform independent after all. The only type which is suppose to be platform dependent according to http://www.freepascal.org/docs-html/ref/refsu6.html is Real (4 or 8 bytes) but so far I only could test it on 64bit machine and it was always 8, no matter if I used 32 or 64 bit compiler version. Funny thing is though that in FPC (both 32 and 64 bit) 2147483647 + 1 = 2147483648 while SizeOf((2147483647 + 1)) is still 4 (silently casting to LongWord?). On Delphi in 64 bit Windows 2147483647 + 1 = -2147483648 but this will happen always, no matter Win32 or Win64 since Delphi is 32bit only ha ha! ;)

Sorry for drifting a away from Mac OS for a moment, but anyway seems to me it doesn't make sense to differentiate between architecture on Mac OS unless you share the project with Delphi. If someone has some definite remarks to it, please let me know.
« Last Edit: March 31, 2011, 10:57:34 am by caleb9 »

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: [SOLVED] Lazarus 64bit
« Reply #1 on: March 31, 2011, 12:26:19 pm »
Such things are actually less a FPC choice, and more a choice that the operating systems made. (to keep the base integer type 32-bit).

For a _very_ short introduction, read:

http://www.stack.nl/~marcov/buildfaq/#toc-Section-5.1

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: [SOLVED] Lazarus 64bit
« Reply #2 on: March 31, 2011, 04:42:28 pm »
Hi,
sorry if this has been asked before but I can't seem to find a clear answer on the Net except of this possibly outdated mail-archive http://www.mail-archive.com/lazarus@lists.lazarus.freepascal.org/msg09030.html. So is it possible to compile 64 bit GUI(!) applications with Lazarus on Mac OS X?

The Carbon GUI framework that Lazarus uses on Mac is only 32 bits and will never be 64 bits, so there's no way you could ever compile a 64 bit app on Mac using the current Carbon widgetset.

Thanks.

-Phil

 

TinyPortal © 2005-2018