Recent

Author Topic: Lazarus x64 also suitable to create 32 bit apps?  (Read 2182 times)

dietmar

  • Full Member
  • ***
  • Posts: 170
Lazarus x64 also suitable to create 32 bit apps?
« on: August 11, 2021, 10:27:12 pm »
Hi,

maybe a stupid question, but I found this nowhere answered. Is it better to install always the 64 bit version of lazarus? Am I able to create also 32 bit applications with it?

Thx
--Dietmar
Lazarus 2.2.0RC1 with FPC 3.2.2 (32 Bit) on Windows10 (64Bit)

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Lazarus x64 also suitable to create 32 bit apps?
« Reply #1 on: August 11, 2021, 10:56:08 pm »
Yes ... with some caveats, depending on your OS.

In Windows it's extremely easy: just install Lazarus 64 bits and then the 32 bit add-on and you're done.

With Mac OS and Linux it's a little more involved since it implies installing multiarch binutils/Xcode, multiarch/32 bit libraries, etc. It can be done but it's not as easy as in Windows. :(
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

avra

  • Hero Member
  • *****
  • Posts: 2261
    • Additional info
Re: Lazarus x64 also suitable to create 32 bit apps?
« Reply #2 on: August 12, 2021, 12:24:23 am »
Is it better to install always the 64 bit version of lazarus? Am I able to create also 32 bit applications with it?
There used to be an issue when cross compiling code which uses 80-bit extended floating point type. Fixed in FPC 3.2 fixes, so just use newer FPC then that.
https://forum.lazarus.freepascal.org/index.php/topic,44168.0.html
« Last Edit: August 12, 2021, 12:26:01 am by avra »
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

wp

  • Hero Member
  • *****
  • Posts: 9017
Re: Lazarus x64 also suitable to create 32 bit apps?
« Reply #3 on: August 12, 2021, 12:39:01 am »
Is it better to install always the 64 bit version of lazarus? Am I able to create also 32 bit applications with it?
I installed both versions (cross-compilation is too complicated because I always forget to switch the options) - diskspace is cheap.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Lazarus x64 also suitable to create 32 bit apps?
« Reply #4 on: August 12, 2021, 02:11:31 am »
cross-compilation is too complicated because I always forget to switch the options

That's one thing for which modes work quite well ... and I guess you don't forget to change from Debug to Release  mode, do you? ;D

Though yes, there should be an easier way to change the mode, other than entering on project options, etc. or the ridiculously small button on the IDE coolbar. :o
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

dbannon

  • Hero Member
  • *****
  • Posts: 1674
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Lazarus x64 also suitable to create 32 bit apps?
« Reply #5 on: August 12, 2021, 02:40:08 am »
Yes indeed, modes make targeting various other platforms dead easy. I have my build system setup to target 32 and 64 bit Linux and Windows and Rasberry Pi. I also have a Mac mode but don't build Mac with cross compiler.

Cross compiling -

https://wiki.freepascal.org/Cross_compiling

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7512
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus x64 also suitable to create 32 bit apps?
« Reply #6 on: August 12, 2021, 11:21:22 am »
Though yes, there should be an easier way to change the mode, other than entering on project options, etc. or the ridiculously small button on the IDE coolbar. :o
1) Install project groups, add your project to a group, and you can access modes from there too.
2) Write an add-on to your taste ;)

 

TinyPortal © 2005-2018