By using the CL compiler under VC, it is easy to compile the LUA source code without having to construct the project and set up various options;
Following the source Lua5.3.1 version for example, will be compiled directly through the CL source code, for easy compilation will use batch script, script placed in the directory after Lua decompression, such as: Lua.bat, the specific content as follows:
mkdir BINCD Srcdel*. OBJCL/O2/W3/C/dlua_build_as_dll *. CDel lua.obj Luac.objlink/dll/ out:.. /bin/lua-5.3.1Dll. OBJCL/O2/W3/C/Dlua_build_as_dll lua.c Luac.clink/dll/ out:.. /bin/lua-5.3.1. exe lua.obj. /bin/lua-5.3.1. Libdel Lua.objlink/ out:.. /bin/luac-5.3.1Exe. Objdel*. OBJCD .
Create the Bin directory under the current path and generate the parser Lua-5.3.1.exe in the bin directory, compiler Luac-5.3.1.exe, and the necessary import library Lua-5.3.1.lib, dynamic library Lua-5.3.1.dll.
Note: You can not directly double-click to execute the Lua.bat script, you must pass the VC Development Environment Command tool into the Lua source extracted directory, input execution: Lua.bat, enter.
The CL compiler compiled by LUA source code compilation