lua-users home
lua-l archive

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


On Wed, 2011-01-19 at 05:20 -0500, Steve Litt wrote:
> On Wednesday 19 January 2011 04:22:05 Steve Litt wrote:
> 
> > Thanks Drake. It worked for me. I had to mess with the library names, but
> >  once they were right it compiled no errors, no warnings. With -Wall there
> >  was one warning about implicit declaration of luaL_openlibs, but I'll
> >  figure that out later.
> 
> Turns out the prototype for LuaL_openlibs() is in lualib.h, so to kill that 
> warning you need to include lualib.h. The referenced example didn't have it 
> because the author didn't compile with -Wall.

Even though I don't always need to, I include the following headers
every time when using Lua from C:

#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>