gcc -o foo foo.c /tmp/ccWYEf9B.o: In function `main': foo.c:(.text+0x17): undefined reference to `luaL_newstate' foo.c:(.text+0x25): undefined reference to `luaopen_base' foo.c:(.text+0x30): undefined reference to `luaopen_table' foo.c:(.text+0x3b): undefined reference to `luaopen_io' foo.c:(.text+0x46): undefined reference to `luaopen_string' foo.c:(.text+0x51): undefined reference to `luaopen_math' foo.c:(.text+0x9d): undefined reference to `luaL_loadbuffer' foo.c:(.text+0xc4): undefined reference to `lua_pcall' foo.c:(.text+0x10e): undefined reference to `lua_tolstring' foo.c:(.text+0x12d): undefined reference to `lua_settop' foo.c:(.text+0x15f): undefined reference to `lua_close' collect2: ld returned 1 exit status