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

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
MWTab
Prole
Posts: 6
Joined: Sat Nov 04, 2023 10:13 pm
Location: Salem, Or, USA
Contact:

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

Post 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
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
User avatar
zorg
Party member
Posts: 3444
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

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

Post 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.
Me and my stuff :3True 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.
MWTab
Prole
Posts: 6
Joined: Sat Nov 04, 2023 10:13 pm
Location: Salem, Or, USA
Contact:

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

Post by MWTab »

Thanks, got this to work great. :-).

-Michael.
Michael T, creator of blind accessible games for all

My website: https://2mb.games

My sourcecode repositories: https://git.2mb.codes/~lilmike
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 58 guests