1. Download Lua Source: lua-5.2.3.tar.gz, unzip
2. Establish a Win32 project with VS2013:
1) After downloading the extract to a directory, here is assumed to extract to F:\lua-5.2.3 note the download version, if it is 5.2.x, the following code in the C API has changed
2) Create a new static library project in VS2010 with the project named Lua
A. Select New Win32 Console Project
B. Select the static Library at the wizard interface; precomplied Header is not selected
3) Add code to the project
A. Copy the *.h file under the F:\LUA-5.2.3\SRC directory to the project header files directory
B. Copy the *.c file under the F:\LUA-5.2.3\SRC directory to the project's Code files directory
Note: It is important to note that LUA.C and LUAC.C cannot be copied, and these two files cannot be compiled.
4) Configure the properties of the item to be manipulated in the project's Configuration Properties interface
A. Additional Include directories
Add F:\LUA-5.2.3\SRC
B. Compile as, C/C + +, Configuration Properties
The selection here will affect how the compiled link is specified in the code that follows, and the test chosen is compile as C code
5) may need to be set in the project properties: _crt_secure_no_warnings, close warning
6) Compile to
Compiling Lua source method with vs2013