Recent

Author Topic: Cross compiling from macOS to Windows  (Read 224 times)

carl_caulkett

  • Hero Member
  • *****
  • Posts: 649
Cross compiling from macOS to Windows
« on: October 10, 2024, 01:06:09 pm »
* Mac Mini M1
* macOS 14.6.1
* Lazarus 3.99
* FPC 3.3.1

I've just been looking at https://wiki.lazarus.freepascal.org/Cross_compiling#From_macOS_to_Win64, and this raises a question: When it says "Lazarus will also recompile its component source code; so don't be alarmed, it will just take a little longer", will it leave my system still able to build macOS apps as normal? In other words, will the changes being made for cross-compilation be in addition to Lazarus's capabilities, rather than changing what is already there?
"It builds... ship it!"

Thaddy

  • Hero Member
  • *****
  • Posts: 16177
  • Censorship about opinions does not belong here.
Re: Cross compiling from macOS to Windows
« Reply #1 on: October 10, 2024, 01:10:28 pm »
It will add, not change. The cross compiled libs get their own versioned directory e.g. /usr/lib/fpc/3.3.1/units/x86_64-win64/ , /usr/bin/fpc/3.3.1/x86_64-win64/ etc.(there may be minor differences, depending on platform)
You can write some simple shell scripts to switch between versions.
Note that the bin directory may be simply /usr/bin but that can be configured to the above. for cross compiling with a single version that does not matter too much since the core compiler is always called ppcross<platform>, unless you rename it yourself.
« Last Edit: October 10, 2024, 01:25:08 pm by Thaddy »
If I smell bad code it usually is bad code and that includes my own code.

 

TinyPortal © 2005-2018