body
{
font-family: 微软雅黑;
font-size: 11pt;
line-height: 1.5;
}
html, body
{
color: #000000;
background-color: #C2E7C7;
}
h1 {
font-size:1.5em;
font-weight:bold;
}
h2 {
font-size:1.4em;
font-weight:bold;
}
h3 {
font-size:1.3em;
font-weight:bold;
}
h4 {
font-size:1.2em;
font-weight:bold;
}
h5 {
font-size:1.1em;
font-weight:bold;
}
h6 {
font-size:1.0em;
font-weight:bold;
}
img {
border:0;
max-width: 100%;
height: auto !important;
}
blockquote {
margin-top:0px;
margin-bottom:0px;
}
table {
border-collapse:collapse;
border:1px solid #bbbbbb;
}
td {
border-collapse:collapse;
border:1px solid #bbbbbb;
}
Lua 5.2 编译 For Windows
cl /O2 /W3 /c /DLUA_BUILD_AS_DLL l*.c
del lua.obj luac.obj
link /DLL /out:lua52.dll l*.obj
cd ..
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
link /out:lua.exe lua.obj lua52.lib
cd ..
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
cd ..
md lib
cd lib
del lua.obj luac.obj
link /DLL /out:lua52.dll l*.obj
cl /O2 /W3 /c /DLUA_BUILD_AS_DLL ../src/l*.c
del lua.obj luac.obj
link /DLL /out:lua52.dll l*.obj
cl /O2 /W3 /c /DLUA_BUILD_AS_DLL ../src/lua.c
link /out:lua.exe lua.obj lua52.lib
cl /O2 /W3 /c /DLUA_BUILD_AS_DLL ../src/l*.c
del lua.obj luac.obj
link /DLL /out:lua52.dll l*.obj
cl /O2 /W3 /c /DLUA_BUILD_AS_DLL ../src/lua.c ../src/luac.c
link /out:lua.exe lua.obj lua52.lib
del lua.obj
link /out:luac.exe l*.obj
cd ..
exit
md lib
cd lib
cl /O2 /W3 /c /DLUA_BUILD_AS_DLL ../src/l*.c
del lua.obj luac.obj
link /DLL /out:lua52.dll l*.obj
link /LIB /out:lua52_s.lib l*.obj
cl /O2 /W3 /c /DLUA_BUILD_AS_DLL /MD ../src/l*.c
del lua.obj luac.obj
link /DLL /out:lua52_md.dll l*.obj
cl /O2 /W3 /c /DLUA_BUILD_AS_DLL /MDd ../src/l*.c
del lua.obj luac.obj
link /DLL /out:lua52_mdd.dll l*.obj
cl /O2 /W3 /c /DLUA_BUILD_AS_DLL /MT ../src/l*.c
del lua.obj luac.obj
link /LIB /out:lua52_mt_s.lib l*.obj
cl /O2 /W3 /c /DLUA_BUILD_AS_DLL /MTd ../src/l*.c
del lua.obj luac.obj
link /LIB /out:lua52_mtd_s.lib l*.obj
cl /O2 /W3 /c /DLUA_BUILD_AS_DLL ../src/l*.c
del lua.obj luac.obj
link /DLL /out:lua52.dll l*.obj
cl /O2 /W3 /c /DLUA_BUILD_AS_DLL ../src/lua.c
link /out:lua.exe lua.obj lua52.lib
cl /O2 /W3 /c /DLUA_BUILD_AS_DLL ../src/l*.c
del lua.obj luac.obj
link /DLL /out:lua52.dll l*.obj
cl /O2 /W3 /c /DLUA_BUILD_AS_DLL ../src/lua.c ../src/luac.c
link /out:lua.exe lua.obj lua52.lib
del lua.obj
link /out:luac.exe l*.obj
cd ..
exit
在Test中添加一个cpp文件
using namespace std;
#include<lua.hpp>
int main()
{
lua_State *l = luaL_newstate();
luaL_openlibs(l);
luaL_dofile(l, "main.lua");
lua_close(l);
system("pause");
return 0;
}
ADD 一个lua脚本
1 print("hello world");