Hello,
I was wondering what the best way it is to attach external C/C++ libraries which already have lua bindings made for it in order for it to be exposed to the love lua interpreter. Would it be best to add it to love as a "library" (like how luasocket is implemented) or as a module?
My end goal I'm guessing would be to compile-in the actual binding code into the love runtime and have it access the dll dynamically, but does this binding code need anything special inside to interface with? I only know a tiny bit of C/C++ code, enough to hack around a few things and I'm familiar with building code the "unix" way. I could be over-complicating things and if it's as easy as just adding the binding code to love, linking the external lib, and hit compile, please tell me!
Thanks all
Attaching external C/C++ libs with lua bindings
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Attaching external C/C++ libs with lua bindings
If you want to make a C++ library which uses LÖVE objects natively, you probably want to get the source and create a custom version of LÖVE. If you want to create something which operates separately (like LuaSocket), then create a normal Lua library (e.g. a DLL). In both cases, you will have to distribute binaries for each platform. You can't put a native library in a .love.
Re: Attaching external C/C++ libs with lua bindings
Thanks for the info rude. Looking more into it the library I want to integrate would most likely benefit from having access to however the window context creation is made and the physfs filesystem library at the C++ level, so I need to rethink on how to integrate this in-code so it has a nice API exposed to lua.
This would help if I was more confident in C++, hehe.
This would help if I was more confident in C++, hehe.
Who is online
Users browsing this forum: Bing [Bot], kov_serg and 9 guests