Re: [fpc-pascal] dlmopen on MacOS

2024-11-20 Thread Karoly Balogh via fpc-pascal
Hi, On Wed, 20 Nov 2024, Adriaan van Os via fpc-pascal wrote: > On Linux I would use dlmopen with LM_ID_NEWLM, but MacOS doesn't have > dlmopen and dlopen doesn't have LM_ID_NEWLM. (...) > One wonders how operating systems can be designed that brainlessly. "Reality doesn't support the assumpti

[fpc-pascal] dlmopen on MacOS

2024-11-20 Thread Adriaan van Os via fpc-pascal
I have a shared library on MacOS written in FPC. It needs to be loaded multiple times, that is each time with its own set of global (dylib) variables. On Linux I would use dlmopen with LM_ID_NEWLM, but MacOS doesn't have dlmopen and dlopen doesn't have LM_ID_NEWLM. I can create a copy of the dyl