Page 1 of 1

[solved] load c library with FFI from within .love file?

Posted: Sat Nov 04, 2023 10:18 pm
by MWTab
Hiya,

I'm making a love2d starter template for making blind accessible games in love2d, and I'm running into one snag: I don't know how to load a shared c object that is included in the .love file. If I drop the shared object in the same directory as the .love it works great, but kind of defeats the point of the .love file. Any idea how to do this?

Thanks,

-Michael.

P.S. You can find my starter template here: https://git.2mb.codes/~lilmike/love2d-template

Re: load c library with FFI from within .love file?

Posted: Sun Nov 05, 2023 6:47 am
by zorg
I believe that since c libraries can't be mounted from archives, you need to copy it out to the save folder first, it should be loadable from there.

Re: load c library with FFI from within .love file?

Posted: Mon Nov 06, 2023 2:26 pm
by MWTab
Thanks, got this to work great. :-).

-Michael.