lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Tue, Nov 23, 2010 at 11:51:37AM +0100, Gilles Ganault wrote:

> Am I correct to think that if a user simply needs to run scripts
> through the interpreter (lua) or running pre-compiled scripts through
> the compiler (luac), the other files are simply not needed?

Lua compiles all scripts before executation into its own bytecode; the
luac tool just allows you to do that ahead of time should you have space
constraints on your target device (ie, you need to save room by ripping
out the compiler from Lua.)

> TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
> TO_LIB= liblua.a
> 
> I suppose those files are needed in case Lua is embedded in a C
> program to provide users with the Lua interpreter/compiler, so I don't
> need to provide them just to run scripts from the interpreter or the
> compiler?

These headers provide the API.  You don't need them at runtime, no, but
you will need them to compile your program that embeds Lua.

B.