Lua-Adapter
Use this C++-17 class to bind Lua or even MoonScript to C++.
Usage
LuaAdapter lua{"test.lua"};
int width {0};
lua.Get("width", width); // width=600
» See more examples.
Compilation
Just
#include "LuaAdapter.hpp"
and compile your program
$ g++-8 your_program.cpp -std=c++17 -llua -ldl
Requirements
- Download and install Lua.
- g++-8 or higher
Troubleshooting
If apt-get install g++-8
does not work on your Debian, try add-apt-repository ppa:ubuntu-toolchain-r/test && apt-get update
first.
If g++-8 is not available on your system, you can try an older version of Lua-Adapter.