lua-users home
lua-l archive

Re: Just starting and having a problem.

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


On Tuesday, August 20, 2002, at 08:56 AM, ben wrote:
int main() {
 int status;
 lua_State *L;
 L = lua_open(1000);
 status = lua_dofile(L,"test.lua");
 printf("Status: %i",status);
 lua_close(L);
}
Hi Ben,
You need to open Lua's standard libraries. In 4.1, you'd call the following:
 lua_baselibopen(L);
 lua_iolibopen(L);
 lua_strlibopen(L);
 lua_mathlibopen(L);
Cheers,
Steve

AltStyle によって変換されたページ (->オリジナル) /