Reputation: 1
I'm trying to build a project that runs Lua code from files inside a binary, but I don't know how to put those files into my binary. I know I need to use linker scripts somehow, but I'm inexperienced with linking and building in general. The project is using CMake to build and it's for embedded use. The toolchain the project uses is arm-none-eabi-gcc.
Upvotes: 0
Views: 40
Reputation: 447
One option is to use binding library like ZeroMQ. Here is the info for ZeroMQ Lua binding. gcc can link ZeroMQ for c or c++ bindings, the messages can be passed to different binary executables as long as API on both sides can interpret bytes or data structure through typecasts. Another option is to embed Lua into C++ or C by including headers like shown on this blog. Also here is previously asked embedding Lua in c question. Lua and C linking example can be referred here.
Upvotes: 1