windows Lua

1.http://www.lua.org/下载 最新lua

2.解压,新建build.bat

3. build.bat

cd src
cl /O2 /W3 /c /DLUA_BUILD_AS_DLL l*.c
del lua.obj luac.obj
link /DLL /out:lua52.dll l*.obj
cl /O2 /W3 /c /DLUA_BUILD_AS_DLL lua.c luac.c
link /out:lua.exe lua.obj lua52.lib
del lua.obj
link /out:luac.exe l*.obj
del *.obj

pause

 

4.用vs cmd执行build.bat

5.配置环境变量

path 中添加 E:\lua-5.3.2\src

6.试验是否配置是否成功

cmd 输入 lua

7. 配置 sublime

Tools --> Build System --> New Build System

复制

{

"cmd":["lua", "$file"],

"file_regex": "^(?:lua:)?[\t ](...*?):([0-9]*):?([0-9]*)",

"selector": "source.lua"

}

 

 

保存为 lua.sublime-build

Tools --> Build System --> lua

 

8.新建test.lua

输入:print("Hello World")

 

9.Ctrl + B 执行

 

10 输出中文

首先cmd

右键左上角图标-->属性

当前代码页--> 936(ASNI/OEM - 简体中文GBK)

修改编译系统

 

{

"cmd":["lua", "$file"],

"file_regex": "^(?:lua:)?[\t ](...*?):([0-9]*):?([0-9]*)",

"selector": "source.lua"

"encoding":"936"

}

 

OK

你可能感兴趣的:(windows Lua)