Recent

Author Topic: Compiling for OSX from Windows  (Read 5076 times)

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Compiling for OSX from Windows
« Reply #15 on: September 30, 2020, 04:48:36 am »
You cannot run or compile 32 bit applications on Catalina or later because 32 bit support has (mostly - there are some Carbon bits left) been removed. Mac computers have been 64 bit capable since 2007.

This:

Quote
CarbonBars.pas:

{$IFNDEF cpui386}
{$ERROR only cpu i386 is supported}
{$ENDIF}

suggests that you are trying to compile for 32 bit (i386) instead of 64 bit (x86_64).

Go to Project > Project Options > Compiler Options > Config and Target and setup as follows:

Target OS: Darwin
Target CPU Family: x86_64
Target Processor (Default)
Current LCL widgetset: "Cocoa"

Cocoa is 64 bit; Carbon is 32 bit.

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: Compiling for OSX from Windows
« Reply #16 on: September 30, 2020, 07:12:01 am »
@trev
All correct ! Thanks.

Quote
error: instruction requires: Not 64-bit mode
As stated in a previous post, I have switched back to FPC stable (3.2) due to this error. FPC stable will compile for Darwin i386.

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: Compiling for OSX from Windows
« Reply #17 on: September 30, 2020, 09:51:21 am »
oh. What's the difference?

MacOS (more correctly "Mac OS", there never was a "MacOS") = the Classic Mac Operating System developed for the Macintosh family of personal computers by Apple from 1984 to 2001, starting with System 1 and ending with Mac OS 9.

Darwin = the open source BSD UNIX core set of components on which macOS (originally marketed as Mac OS X and then OS X) runs.

Please note that in FPC trunk the Mac OS Classic target has been renamed to MacOSClassic so that in the future we might add a specific MacOS target that would allow for differences between pure Darwin and full MacOS (e.g. user/global settings). This also lead to the introduction of an explicit iOS target, which blocked aarch64-darwin.

Grahame Grieve

  • Sr. Member
  • ****
  • Posts: 365
Re: Compiling for OSX from Windows
« Reply #18 on: September 30, 2020, 02:46:33 pm »
ok, cocoa vs carbon was my issue - compiling for fine now, great.

Thanks for all the help, really appreciate it.

 

TinyPortal © 2005-2018