Compiling Lua source method with vs2013

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.