There is the first example with 26 lines of code, and the gcc command. I've tried several examples, but I always got this error:
luainit.c:(.text+0x10): undefined reference to `lua_open'
luainit.c:(.text+0x26): undefined reference to `luaopen_base'
luainit.c:(.text+0x35): undefined reference to `luaopen_table'
or in other snippets from other examles:
luaload.c:(.text+0x1c): undefined reference to `luaL_newstate'
luaload.c:(.text+0x33): undefined reference to `luaL_openlibs'
luaload.c:(.text+0x44): undefined reference to `luaL_loadfile'
...
I've tried them with lua5.2, lua5.1, and now the current version is lua5.0. The gcc command is exactly: