It looks like this technique cannot work on macOS.
This is bound to the fact that if a console executable file is started all added paths to the PATH variable are lost.
Even when PureBasic.app is started in an environment were the added paths are listed (like in your latest example for macOS) the bad thing is that PureBasic.app calls the pbcompilerc file (which is a console executable file) and all added paths to the PATH variable are lost again.
(pbcompilerc calls clang)
Obviously on macOS, flexibility like this is sacrificed for security.
The only way to go around this is if Fred would allow the user to keep the object files and let's us add object files to the linking process.
If someone with macOS finds a way to achieve what is possible on Linux and Windows... please let us know.
This, because I'm surely not the smartest cookie in the cookie jar...
