Lua environment installation
Linux system installed
Linux and Mac installation Lua installation is very simple, only need to download the source package and decompression in the terminal can be compiled, this article uses the 5.3.0 version to install:
curl - R & lt - O HTTP : //www.lua.org/ftp/lua-5.3.0.tar.gz the tar zxf Lua - 5.3 . 0.tar . GZ Cd lua - 5.3 . 0 Make linux test Make install
Installed on Mac OS X system
curl - R & lt - O HTTP : //www.lua.org/ftp/lua-5.3.0.tar.gz the tar zxf Lua - 5.3 . 0.tar . GZ Cd lua - 5.3 . 0 Make macosx test Make installNext we create a HelloWorld.lua file with the following code:
Print ( "Hello World!" )
Execute the following command:
$ Lua HelloWorld . Lua
The output is:
Hello World !
Install Lua on the Window system
Window you can use a called "SciTE" IDE environment to implement lua program, download address:
- Download this site: LuaForWindows_v5.1.4-46.exe
- Github download address: https://github.com/rjpcomputing/luaforwindows/releases
- Google Code download address: https://code.google.com/p/luaforwindows/downloads/list
Double-click to install the Lua program and run it in that environment.
You can also use Lua's official recommended method to use LuaDist: http://luadist.org/
EmoticonEmoticon