lua-users home
lua-l archive

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


Hi!

Help me please.
I'm use lua 1 month.
How to build lua-source file to Win32-EXE file?

Now, I Use Wrapper:

/*--------------------------------------------*/
#include <stdio.h>
#include < lua.h>
#include <lauxlib.h>
#include <lualib.h>

int main(int argc, char* argv[])
{
int error;
lua_State *L = lua_open();

luaL_openlibs(L);

error =  luaL_dofile(L," file.lc");   

if(error)
{
printf("ERROR: %s \n", lua_tostring(L, -1));
lua_pop(L, 1);
}

lua_close(L);

return 0;
}
/*--------------------------------------------*/

file.lc - Lua ByteCode (make with luac.exe)

I want build single-exe file.