Technical requirements
You will use the interactive Lua interpreter to follow the code examples in this chapter. We have built it from the Lua source code in Chapter 1. You can also use a Lua interpreter from another channel, for example, the one installed by your operating system’s package manager. Before continuing, make sure you have access to one.
When you see code examples in this chapter, like the following one, you should try the example in an interactive Lua shell:
Lua 5.4.6 Copyright (C) 1994-2022 Lua.org, PUC-Rio > os.exit() %
The first line is what the Lua interpreter outputs when it starts. Use os.exit()
to quit the interpreter.
You can find the source code for this chapter within the book’s GitHub repository: https://github.com/PacktPublishing/Integrate-Lua-with-CPP/tree/main/Chapter02