lua-users home
lua-l archive

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


>Now when I run the C program, it looks like the lua_call() function 
>doesn't do anything since the previous lua_getglobal() doesn't 
>actually find the "main" function. Am I doing something wrong here?

luaL_loadfile does not run the code only loads it. So, main never gets defined.
Try lua_dofile instead or lua_call after luaL_loadfile.
--lhf