lua-users home
lua-l archive

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

Hi everyone,

I'm trying to work with LUA (after a long long time) and my old simple script doesn't work :

my a.lua
io.write( "Hello World" );

my C minimal test :
int main( int argc, char *argv[] ) {
   lua_State *ls = luaL_newstate();
   luaL_openlibs( ls );
   luaL_dofile( ls, "a.lua" );
   printf("after dofile\n");
    return 0;

calling luaL_dofile seems to quit my programm, after several tests, I've found that if I remove io.close() from a.lua, it works.

I'm using lua 5.1.2 and Ubuntu 6.10 (GCC 4.1.2)

Any tips ?
Thanks in advance
Michael Bonfils ( )
membre de