Skip to content

lightweight header-only Lua - C++ adapter / binding

License

Notifications You must be signed in to change notification settings

JlnWntr/Lua-Adapter

Repository files navigation

Lua-Adapter

Use Lua 5.3+ in your C++ program.

Usage

#include "LuaAdapter.hpp"

int main(){
  LuaAdapter lua{"test.lua"}; // load lua-file

  int width {0};
  lua.Get("width", width);  // width=600

  return 0;
}

Build and test Lua-Adapter using g++

$ g++ the_program_above.cpp -std=c++17 -llua -ldl