I managed to link and load a dynamic library when using the simulator on macOS:
01:05AM - 25 Feb 23 UTC
It seems possible to use dynamically linked libraries with the simulat
I'm wondering if this is possible on devices. I don't have a device yet so I can't experiment.
I'm hoping someone could provide some insight on that so I can consider moving forward using the simulator for now and figure out static build later.
I explained in the linked GitHub issue that I wasn't able to figure out how to modify the search paths for the simulator.
If anyone has any info on how to do that, I'd appreciate it.
As far as I remember FreeRTOS (the OS the Playdate runs) doesn't support dynamic linking, sadly.
Thanks. I didn’t know about FreeRTOS.
I found an
old support thread from 2011 that says the same.
The current C API loader requires code to be compiled for a specific address, but we do have a new loader in the works that does relocation. I
think that's all we'll need in order to support dynamic libraries on the device, but no promises
Thanks, thats good to know!
Creating a static library looks more promising than I first thought in this case, but still a non-zero amount of effort.
Dynamic library support would be good in general.