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
[solved] load c library with FFI from within .love file?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
[solved] load c library with FFI from within .love file?
Last edited by MWTab on Mon Nov 06, 2023 2:27 pm, edited 1 time in total.
Michael T, creator of blind accessible games for all
My website: https://2mb.games
My sourcecode repositories: https://git.2mb.codes/~lilmike
My website: https://2mb.games
My sourcecode repositories: https://git.2mb.codes/~lilmike
- zorg
- Party member
- Posts: 3470
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: load c library with FFI from within .love file?
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.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: load c library with FFI from within .love file?
Thanks, got this to work great. :-).
-Michael.
-Michael.
Michael T, creator of blind accessible games for all
My website: https://2mb.games
My sourcecode repositories: https://git.2mb.codes/~lilmike
My website: https://2mb.games
My sourcecode repositories: https://git.2mb.codes/~lilmike
Who is online
Users browsing this forum: Bing [Bot] and 2 guests