确定Lua编译器运行32位还是64位 [英] Determine whether Lua compiler runs 32 or 64 bit

查看:671
本文介绍了确定Lua编译器运行32位还是64位的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我当前在默认开发系统上使用Windows,在部署Lua脚本的服务器上使用Linux.对于Windows,只有几个32位解释器,例如适用于Windows的Lua 我目前使用的(至少据我所知).在服务器上,解释器以64位运行脚本.

I am currently using Windows on my default development system and Linux on my server where I deploy my Lua scripts. For Windows there are only several 32 bit interpreters like Lua for Windows one I currently use (at least as far as i know). On the server the interpreter is running the scripts on 64 bits.

现在我的问题是:是否可以检查脚本在哪种体系结构上运行(可能类似于该版本的_ENV变量)?

Now my question is: Is it possible to check on which architecture the script is running (probably similar to the _ENV variable for the version)?

如果有任何64位Windows Lua解释器,请随时对此事发表评论.预先谢谢你.

If there is any 64 bit Windows Lua interpreter feel free to leave a comment on this matter. Thank you in advance.

推荐答案

如果可以获取有关如何在Windows上执行此操作的建议.

我也对通过Lua脚本(以及与Lua和LuaJIT解释器一起使用的脚本)执行此操作的更简单方法感兴趣,因为我遇到了一种情况,我想根据32bit是否引用不同的路径或64位库需要加载而无需用户指定这些路径.

I'm also interested in simpler ways to do it from a Lua script (and the one that works with Lua and LuaJIT interpreters), as I ran into a case when I'd like to reference different paths depending on whether 32bit or 64bit library needs to be loaded without the user having to specify those paths.

这篇关于确定Lua编译器运行32位还是64位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆