http://blog.csdn.net/yue7603835/article/details/41739085
http://blog.csdn.net/birdflyto206/article/details/49403801
Building Lua on other systems
If you're not using the usual Unix tools, then the instructions for building Lua depend on the compiler you use. You'll need to create projects (or whatever your compiler uses) for building the library, the interpreter, and the compile R, as follows:
-
library:
-
lapi.c lcode.c lctype.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c L MEM.C lobject.c lopcodes.c lparser.c lstate.c lstring.c ltable.c ltm.c lundump.c lvm.c lzio.c lauxlib.c lbaselib.c lbitlib . C LCOROLIB.C LDBLIB.C liolib.c lmathlib.c loslib.c lstrlib.c ltablib.c lutf8lib.c loadlib.c linit.c
-
interp Reter:
-
Library, lua.c
-
compiler:
-
Library, luac.c
To the use of Lua as a library in the your own programs you'll need to know what to create and use libraries with your compiler. Moreover, to dynamically load C libraries for Lua "ll need to know how to create dynamic libraries and you'll need to M Ake sure that the LUA API functions is accessible to those dynamic libraries-butdon ' t link the LUA library int o each dynamic library. For Unix, we recommend the Lua library is linked statically into the host program and its symbols exported for Dynami c linking; Src/makefile does this for the LUA interpreter. For Windows, we recommend this Lua library be a DLL. In all cases, the compiler luac should is linked statically.
As mentioned above, you could edit src/luaconf.h to customize some features before building Lua.
Compiling LUA under Windows