[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to do a Lua<->C hello world in Lua 5.1?
- From: Michal Kottman <k0mpjut0r@...>
- Date: Wed, 19 Jan 2011 11:32:16 +0100
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>