现在的位置: 首页 > 综合 > 正文

luajit笔记—编译bytecode(字节码文件)

2013年10月28日 ⁄ 综合 ⁄ 共 572字 ⁄ 字号 评论关闭

虽说这种东西其实没多少用,不过老板是烧饼所以不会承认的,不过编译之后别人反编译也看不到变量命这种自欺欺人的心理作用还是有点用的。于是发现lua5.1编译出来的字节码luajit是不能用的,后来去官网看到编译方法,输入后却说没有这个命令,卧槽。于是继续google,找到了一个跟我一样的家伙,后面有人给出解决方案了

In the LuaJIT source distribution, there is a folder called 'libs'
which contain necessary Lua files. Rename this as 'jit'.

Make a folder in the same directory as luajit.exe and call it 'lua';
copy the 'jit' folder into 'lua'.

The 'lua' folder will be where LuaJIT will initially look for Lua
packages;  now it contains the jit package and 'luajit -b' will work
and show you how to compile files to bytecode.


来自http://lua-users.org/lists/lua-l/2011-06/msg01241.html

我就不翻译了,不懂的自学英语去,总之能用就是了

抱歉!评论已关闭.