Example of the use of the Lua API in C++.

In this example its demonstrated:

  • Creating a Lua state,
  • Send and receive values through the call stack
  • Creating C++ functions which can be accessed through the Lua script
  • Calling lua functions through C++

These files are for a basic overview about the workflow using the Lua API, you can play around as much as you want. Read the comments and try looking for external references such as the lua official site.


Download the source code.