How to set up and cross compile on Lazarus to macOS

I’m sure I read somewhere that cross compiling to macOS from Windows on Lazarus was simple, especially given that I read that they ‘ported’, the VCL/LCL.

However, I’m unable to find a step by step example of what ‘extensions’ to install and how to get it to work.

Does anyone have anything?

Not sure about Lazarus but with Delphi you can either use FMXLinux (included with RAD Studio Enterprise) for FMX-based apps or CrossVCL for VCL apps.

CrossVCL is here - https://www.crossvcl.com FMXLinux can be found in the GetIt package manager in RAD Studio.

I feel like fcpupdeluxe has options that try to set you up for cross-compilation.

There’s a cross-comp chapter here :
https://wiki.freepascal.org/fpcupdeluxe#Cross-compiling

Maybe, but well, no joy, for me at least.

Simply trying yields “No valid FPC install found. Please install FPC first”. This was with the install path set to my install, which came from the ‘standard windows installer’.

So, based on some things I’d read, I suspected I needed to install FPC using this tool, but that didn’t work either and gave

ERROR: Fpcupdeluxe fatal error !

Sequencer (FPC): Failure running fpcupdeluxe: error executing sequence FPC

Sequencer (Defaultwin32): Failure running fpcupdeluxe: error executing sequence Defaultwin32

Just seems to be all too hard, and many of the online threads seem to be along the lines of you need to install FPC/Lazarus on Windows, and again on Mac to cross compile, which aint cross compiling in my book.

I was initially thinking of using Delphi but it ‘needs’ a Mac running PAServer just to ‘get started’, and I don’t even know if I can ultimately go down this path, so to get a Mac just to see if I can do this at all isn’t very cost effective.

I have seen references to “online Mac” services that can help with this problem.
I don’t remember offhand the details.

There are a few - I have used this one myself a few years back: https://www.macincloud.com

You can also use Mac Stadium: https://www.macstadium.com

There are some other companies around too but these two are the ones of which I have personal experience.

1 Like

Hay thanks all you guys
I see I have to learn android studio because of Android’s use of Java as a real answer to my objectives. better find out sooner than latter