Forum > macOS / Mac OS X

trying to compile 32bit on 64bit OSX. Linker Error

<< < (2/3) > >>

Jonas Maebe:

--- Quote from: geraldholdsworth on May 08, 2021, 06:13:52 pm ---That simple?

Well, for me, not so. Where does one put the -XR/<path>?

--- End quote ---
Sorry, I never use Lazarus for compiling, only for editing and code navigation.


--- Quote ---After a bit of Internet searching, all I could find suggested adding

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---if TargetOS = 'darwin' then begin  UsageCustomOptions += ' -k-macosx_version_min -k10.5';  UsageCustomOptions += ' -XR/Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk/';end;
To Project Options->Custom Options, in the top box with macOS 32bit Build mode selected (which worked OK before I upgraded). I even tried in the bottom box with no luck. I also tried adding -XR/<path> to the end of the Compiler executable entry in Tools->Options->Environment->Files, but it didn't like the entry when I clicked on OK.

--- End quote ---
I can't help you with this, but please never use "' -k-macosx_version_min -k10.5'". Use -WM10.5 instead.

geraldholdsworth:
I've found a couple of fpc.cfg files which contain a pointer to the SDK, so I changed them to point to the 10.13 one...didn't make a difference. :(

Jonas Maebe:
Try adding it directly in the custom options box, i.e. just add your -XR parameter there without any if-check, quotes, or "UsageCustomOptions +=".

trev:
The only Mac computer in the last 15 years that could not run 64 bit applications was the 2006 Mac mini with Intel Core Solo processor. Do you really need to compile 32 bit applications?

If all else fails, there are options:

1) install a Virtual Machine of Mojave using either Parallels ($$) or VMware Fusion ($$ / free for personal use);
2) install Mojave on an external disk;
3) partition the system disk and install Mojave

geraldholdsworth:

--- Quote from: Jonas Maebe on May 08, 2021, 08:44:42 pm ---Try adding it directly in the custom options box, i.e. just add your -XR parameter there without any if-check, quotes, or "UsageCustomOptions +=".

--- End quote ---
Yep, that did it. Thank you.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version