chenxuuu / llcom

🛠功能强大的串口工具。支持Lua自动化处理、串口调试、WinUSB、串口曲线、TCP测试、MQTT测试、编码转换、乱码恢复等功能
https://llcom.papapoi.com/
Apache License 2.0
823 stars 201 forks source link

执行带require"bit"模块的脚本时提示loading失败 #149

Closed gigss closed 11 months ago

gigss commented 11 months ago

描述一下这个bug / Describe the bug

试过编译5.1 5.2和5.3的bit.dll并放置到llcom的根目录下,都会提示loading失败 [17:09:37:5070][I]-[sys] core loaded! [17:09:37:5110]lua代码报错了: XLua.LuaException: error loading module 'bit' from file 'D:\Program Files\llcom\bit.dll': %1 ������Ч�� Win32 Ӧ�ó���

stack traceback: [C]: in ? [C]: in upvalue 'oldrequire' D:\Program Files\llcom\core_script\head.lua:41: in function 'require' D:\Program Files\llcom\user_script_run\test.lua:2: in main chunk [C]: in upvalue 'oldrequire' D:\Program Files\llcom\core_script\head.lua:41: in function 'require' [string "chunk"]:1: in main chunk 在 XLua.LuaEnv.ThrowExceptionFromError(Int32 oldTop) 在 XLua.LuaEnv.DoString(Byte[] chunk, String chunkName, LuaTable env) 在 XLua.LuaEnv.DoString(String chunk, String chunkName, LuaTable env) 在 llcom.LuaEnv.LuaRunEnv.<>c__DisplayClass16_0.b__0()

复现步骤 / To Reproduce

单独执行lua命令,是可以导入bit库. D:\Program Files\luabitop-53plus-master\luabitop-53plus-master>lua -v Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio

D:\Program Files\luabitop-53plus-master\luabitop-53plus-master>lua bitbench.lua loop baseline 9.2 ns tobit 25.8 ns bnot 25.1 ns

预期的行为 / Expected behavior

帮忙指导下怎样才能正确导入bit库

截图 / Screenshots

No response

日志 / Logs

No response

系统 / System

win10

软件版本 / Version

1.1.3.2

验证

chenxuuu commented 11 months ago

把dll传上来

gigss commented 11 months ago

把dll传上来

公司网络上传文件不方便,已发邮件给您,感谢回复🤝🏻

chenxuuu commented 11 months ago

图片

llcom的lua是64位的,你要用64位的dll才行

gigss commented 11 months ago

图片

llcom的lua是64位的,你要用64位的dll才行 重新编译64位dill后提示这个 [20:02:20:7053][I]-[sys] core loaded! [20:02:20:7093]lua代码报错了: XLua.LuaException: error loading module 'bit' from file 'D:\Program Files\llcom\bit.dll': �Ҳ���ָ����ģ�顣

stack traceback: [C]: in ? [C]: in upvalue 'oldrequire' D:\Program Files\llcom\core_script\head.lua:41: in function 'require' D:\Program Files\llcom\user_script_run\test.lua:2: in main chunk [C]: in upvalue 'oldrequire' D:\Program Files\llcom\core_script\head.lua:41: in function 'require' [string "chunk"]:1: in main chunk 在 XLua.LuaEnv.ThrowExceptionFromError(Int32 oldTop) 在 XLua.LuaEnv.DoString(Byte[] chunk, String chunkName, LuaTable env) 在 XLua.LuaEnv.DoString(String chunk, String chunkName, LuaTable env) 在 llcom.LuaEnv.LuaRunEnv.<>c__DisplayClass16_0.b__0()

gigss commented 11 months ago

我是通过附件源码编译bit.dll的

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2023年10月30日 18:09 | | 收件人 | @.> | | 抄送至 | @.>@.> | | 主题 | Re: [chenxuuu/llcom] 执行带require"bit"模块的脚本时提示loading失败 (Issue #149) |

llcom的lua是64位的,你要用64位的dll才行

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

chenxuuu commented 11 months ago

文件发出来

---原始邮件--- 发件人: @.> 发送时间: 2023年10月30日(周一) 晚上8:11 收件人: @.>; 抄送: @.**@.>; 主题: Re: [chenxuuu/llcom] 执行带require"bit"模块的脚本时提示loading失败 (Issue #149)

我是通过附件源码编译bit.dll的

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2023年10月30日 18:09 | | 收件人 | @.> | | 抄送至 | @.>@.> | | 主题 | Re: [chenxuuu/llcom] 执行带require"bit"模块的脚本时提示loading失败 (Issue #149) |

llcom的lua是64位的,你要用64位的dll才行

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.> — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.>

gigss commented 11 months ago

文件发出来 ---原始邮件--- 发件人: @.> 发送时间: 2023年10月30日(周一) 晚上8:11 收件人: @.>; 抄送: @.**@.>; 主题: Re: [chenxuuu/llcom] 执行带require"bit"模块的脚本时提示loading失败 (Issue #149) 我是通过附件源码编译bit.dll的 ---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2023年10月30日 18:09 | | 收件人 | @.> | | 抄送至 | @.>@.> | | 主题 | Re: [chenxuuu/llcom] 执行带require"bit"模块的脚本时提示loading失败 (Issue #149) | llcom的lua是64位的,你要用64位的dll才行 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.> — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.>

邮件转发您了,有空帮我看看哈

chenxuuu commented 11 months ago

图片

dll有问题

gigss commented 11 months ago

图片

dll有问题

您那边有llcom能用的bit.dll吗,有的话麻烦发我试试

gigss commented 11 months ago

图片 dll有问题

您那边有llcom能用的bit.dll吗,有的话麻烦发我试试 我这边用用5.3.4是可以导入的 image

chenxuuu commented 11 months ago

我用不到bit库,因为lua5.3自带位运算功能

---原始邮件--- 发件人: @.> 发送时间: 2023年10月31日(周二) 中午1:35 收件人: @.>; 抄送: @.**@.>; 主题: Re: [chenxuuu/llcom] 执行带require"bit"模块的脚本时提示loading失败 (Issue #149)

dll有问题

您那边有llcom能用的bit.dll吗,有的话麻烦发我试试 我这边用用5.3.4是可以导入的

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

gigss commented 11 months ago

我用不到bit库,因为lua5.3自带位运算功能 ---原始邮件--- 发件人: @.> 发送时间: 2023年10月31日(周二) 中午1:35 收件人: @.>; 抄送: @.**@.>; 主题: Re: [chenxuuu/llcom] 执行带require"bit"模块的脚本时提示loading失败 (Issue #149) dll有问题 您那边有llcom能用的bit.dll吗,有的话麻烦发我试试 我这边用用5.3.4是可以导入的 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

新版本可以把bit运行加入到新功能吗,串口数据解释经常要用到位运算呢

chenxuuu commented 11 months ago

lua里直接就能用位运算符号,没有加的意义

---原始邮件--- 发件人: @.> 发送时间: 2023年11月1日(周三) 上午10:20 收件人: @.>; 抄送: @.**@.>; 主题: Re: [chenxuuu/llcom] 执行带require"bit"模块的脚本时提示loading失败 (Issue #149)

我用不到bit库,因为lua5.3自带位运算功能 … ---原始邮件--- 发件人: @.> 发送时间: 2023年10月31日(周二) 中午1:35 收件人: @.>; 抄送: @.@.>; 主题: Re: [chenxuuu/llcom] 执行带require"bit"模块的脚本时提示loading失败 (Issue #149) dll有问题 您那边有llcom能用的bit.dll吗,有的话麻烦发我试试 我这边用用5.3.4是可以导入的 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

新版本可以把bit运行加入到新功能吗,串口数据解释经常要用到位运算呢

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

gigss commented 11 months ago

lua里直接就能用位运算符号,没有加的意义 ---原始邮件--- 发件人: @.> 发送时间: 2023年11月1日(周三) 上午10:20 收件人: @.>; 抄送: @.**@.>; 主题: Re: [chenxuuu/llcom] 执行带require"bit"模块的脚本时提示loading失败 (Issue #149) 我用不到bit库,因为lua5.3自带位运算功能 … ---原始邮件--- 发件人: @.> 发送时间: 2023年10月31日(周二) 中午1:35 收件人: @.>; 抄送: @.@.>; 主题: Re: [chenxuuu/llcom] 执行带require"bit"模块的脚本时提示loading失败 (Issue #149) dll有问题 您那边有llcom能用的bit.dll吗,有的话麻烦发我试试 我这边用用5.3.4是可以导入的 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.> 新版本可以把bit运行加入到新功能吗,串口数据解释经常要用到位运算呢 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.>

对哦,明白了,感谢