actboy168 / bee.lua

Lua runtime and toolset
MIT License
160 stars 30 forks source link

加载dll报错: error loading module 'bee' from file #37

Closed yuyuko-C closed 1 year ago

yuyuko-C commented 1 year ago

使用的是 luamake -EXE lua 命令

actboy168 commented 1 year ago

require "bee"require "bee.filesystem"

yuyuko-C commented 1 year ago

大概是生成的Dll有问题. 我详细描述一下我的问题, 因为我不太清楚关键点在哪里所以看上去会提供许多无效信息, 请见谅. 请帮帮忙我

我的使用环境是英萌框架的Lua作图. 需要使用bee.filesystem,bee.http. 环境信息:

于是转而使用 luamake 生成, 在完成 Install 的步骤后在 build/msvc/bin 里得到了三个文件

我将三个文件复制到 bee.lua 的目录下,

至于昨天使用的 bee.dll 是虽然报错了但依然出现在 build/bin 文件夹里. 在我测试的三个环境里均会报错, 一定是一个无法使用的版本.

actboy168 commented 1 year ago

YDWE依赖的是旧版本的bee,你得去YDWE的repo里编译。

yuyuko-C commented 1 year ago

谢谢, 请问还能告知一下生成DLL报错的问题在哪里吗. 我不理解为什么两个命令一个可行一个不可行.

actboy168 commented 1 year ago

你更新到最新就好了

yuyuko-C commented 1 year ago

谢谢, 更新后的确可以正确生成DLL了. YDWE的旧版bee应该是指的这个分支吧 bee.lua 我安装了ninja后执行 ninja -f ninja/msvc.ninja 后出现了一大堆的报错. 请问还有救吗?

PS G:\Project\bee.lua-31bd3fabd2dd3aed0f7ce84504ee647a29b9315d> ninja -f ninja/msvc.ninja
[1/69] Compile C   build/msvc/obj/lua54/lapi.obj
FAILED: build/msvc/obj/lua54/lapi.obj
cl /nologo /showIncludes -c 3rd/lua/lapi.c /Fobuild/msvc/obj/lua54/lapi.obj /EHsc /Zc:__cplusplus /O2 /GL /Zc:inline /W3 /permissive- /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
CreateProcess failed: The system cannot find the file specified.
[2/69] Compile C   build/msvc/obj/lua54/lauxlib.obj
FAILED: build/msvc/obj/lua54/lauxlib.obj
cl /nologo /showIncludes -c 3rd/lua/lauxlib.c /Fobuild/msvc/obj/lua54/lauxlib.obj /EHsc /Zc:__cplusplus /O2 /GL /Zc:inline /W3 /permissive- /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
CreateProcess failed: The system cannot find the file specified.
[3/69] Compile C   build/msvc/obj/lua54/lbaselib.obj
FAILED: build/msvc/obj/lua54/lbaselib.obj
cl /nologo /showIncludes -c 3rd/lua/lbaselib.c /Fobuild/msvc/obj/lua54/lbaselib.obj /EHsc /Zc:__cplusplus /O2 /GL /Zc:inline /W3 /permissive- /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
CreateProcess failed: The system cannot find the file specified.
[4/69] Compile C   build/msvc/obj/lua54/lcode.obj
FAILED: build/msvc/obj/lua54/lcode.obj
cl /nologo /showIncludes -c 3rd/lua/lcode.c /Fobuild/msvc/obj/lua54/lcode.obj /EHsc /Zc:__cplusplus /O2 /GL /Zc:inline /W3 /permissive- /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
CreateProcess failed: The system cannot find the file specified.
[5/69] Compile C   build/msvc/obj/lua54/lcorolib.obj
FAILED: build/msvc/obj/lua54/lcorolib.obj
cl /nologo /showIncludes -c 3rd/lua/lcorolib.c /Fobuild/msvc/obj/lua54/lcorolib.obj /EHsc /Zc:__cplusplus /O2 /GL /Zc:inline /W3 /permissive- /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
CreateProcess failed: The system cannot find the file specified.
[6/69] Compile C   build/msvc/obj/lua54/lctype.obj
FAILED: build/msvc/obj/lua54/lctype.obj
cl /nologo /showIncludes -c 3rd/lua/lctype.c /Fobuild/msvc/obj/lua54/lctype.obj /EHsc /Zc:__cplusplus /O2 /GL /Zc:inline /W3 /permissive- /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
CreateProcess failed: The system cannot find the file specified.
[7/69] Compile C   build/msvc/obj/lua54/ldblib.obj
FAILED: build/msvc/obj/lua54/ldblib.obj
cl /nologo /showIncludes -c 3rd/lua/ldblib.c /Fobuild/msvc/obj/lua54/ldblib.obj /EHsc /Zc:__cplusplus /O2 /GL /Zc:inline /W3 /permissive- /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
CreateProcess failed: The system cannot find the file specified.
[8/69] Compile C   build/msvc/obj/lua54/ldebug.obj
FAILED: build/msvc/obj/lua54/ldebug.obj
cl /nologo /showIncludes -c 3rd/lua/ldebug.c /Fobuild/msvc/obj/lua54/ldebug.obj /EHsc /Zc:__cplusplus /O2 /GL /Zc:inline /W3 /permissive- /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
CreateProcess failed: The system cannot find the file specified.
[9/69] Compile C   build/msvc/obj/lua54/ldo.obj
FAILED: build/msvc/obj/lua54/ldo.obj
cl /nologo /showIncludes -c 3rd/lua/ldo.c /Fobuild/msvc/obj/lua54/ldo.obj /EHsc /Zc:__cplusplus /O2 /GL /Zc:inline /W3 /permissive- /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
CreateProcess failed: The system cannot find the file specified.
[10/69] Compile C   build/msvc/obj/lua54/ldump.obj
FAILED: build/msvc/obj/lua54/ldump.obj
cl /nologo /showIncludes -c 3rd/lua/ldump.c /Fobuild/msvc/obj/lua54/ldump.obj /EHsc /Zc:__cplusplus /O2 /GL /Zc:inline /W3 /permissive- /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
CreateProcess failed: The system cannot find the file specified.
ninja: build stopped: subcommand failed.
PS G:\Project\bee.lua-31bd3fabd2dd3aed0f7ce84504ee647a29b9315d> ninja -f ./ninja/msvc.ninja.
[1/69] Compile C   build/msvc/obj/lua54/lapi.obj
FAILED: build/msvc/obj/lua54/lapi.obj
cl /nologo /showIncludes -c 3rd/lua/lapi.c /Fobuild/msvc/obj/lua54/lapi.obj /EHsc /Zc:__cplusplus /O2 /GL /Zc:inline /W3 /permissive- /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
CreateProcess failed: The system cannot find the file specified.
[2/69] Compile C   build/msvc/obj/lua54/lauxlib.obj
FAILED: build/msvc/obj/lua54/lauxlib.obj
cl /nologo /showIncludes -c 3rd/lua/lauxlib.c /Fobuild/msvc/obj/lua54/lauxlib.obj /EHsc /Zc:__cplusplus /O2 /GL /Zc:inline /W3 /permissive- /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
CreateProcess failed: The system cannot find the file specified.
[3/69] Compile C   build/msvc/obj/lua54/lbaselib.obj
FAILED: build/msvc/obj/lua54/lbaselib.obj
cl /nologo /showIncludes -c 3rd/lua/lbaselib.c /Fobuild/msvc/obj/lua54/lbaselib.obj /EHsc /Zc:__cplusplus /O2 /GL /Zc:inline /W3 /permissive- /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
CreateProcess failed: The system cannot find the file specified.
[4/69] Compile C   build/msvc/obj/lua54/lcode.obj
FAILED: build/msvc/obj/lua54/lcode.obj
cl /nologo /showIncludes -c 3rd/lua/lcode.c /Fobuild/msvc/obj/lua54/lcode.obj /EHsc /Zc:__cplusplus /O2 /GL /Zc:inline /W3 /permissive- /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
CreateProcess failed: The system cannot find the file specified.
[5/69] Compile C   build/msvc/obj/lua54/lcorolib.obj
FAILED: build/msvc/obj/lua54/lcorolib.obj
cl /nologo /showIncludes -c 3rd/lua/lcorolib.c /Fobuild/msvc/obj/lua54/lcorolib.obj /EHsc /Zc:__cplusplus /O2 /GL /Zc:inline /W3 /permissive- /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
CreateProcess failed: The system cannot find the file specified.
[6/69] Compile C   build/msvc/obj/lua54/lctype.obj
FAILED: build/msvc/obj/lua54/lctype.obj
cl /nologo /showIncludes -c 3rd/lua/lctype.c /Fobuild/msvc/obj/lua54/lctype.obj /EHsc /Zc:__cplusplus /O2 /GL /Zc:inline /W3 /permissive- /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
CreateProcess failed: The system cannot find the file specified.
[7/69] Compile C   build/msvc/obj/lua54/ldblib.obj
FAILED: build/msvc/obj/lua54/ldblib.obj
cl /nologo /showIncludes -c 3rd/lua/ldblib.c /Fobuild/msvc/obj/lua54/ldblib.obj /EHsc /Zc:__cplusplus /O2 /GL /Zc:inline /W3 /permissive- /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
CreateProcess failed: The system cannot find the file specified.
[8/69] Compile C   build/msvc/obj/lua54/ldebug.obj
FAILED: build/msvc/obj/lua54/ldebug.obj
cl /nologo /showIncludes -c 3rd/lua/ldebug.c /Fobuild/msvc/obj/lua54/ldebug.obj /EHsc /Zc:__cplusplus /O2 /GL /Zc:inline /W3 /permissive- /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
CreateProcess failed: The system cannot find the file specified.
[9/69] Compile C   build/msvc/obj/lua54/ldo.obj
FAILED: build/msvc/obj/lua54/ldo.obj
cl /nologo /showIncludes -c 3rd/lua/ldo.c /Fobuild/msvc/obj/lua54/ldo.obj /EHsc /Zc:__cplusplus /O2 /GL /Zc:inline /W3 /permissive- /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
CreateProcess failed: The system cannot find the file specified.
[10/69] Compile C   build/msvc/obj/lua54/ldump.obj
FAILED: build/msvc/obj/lua54/ldump.obj
cl /nologo /showIncludes -c 3rd/lua/ldump.c /Fobuild/msvc/obj/lua54/ldump.obj /EHsc /Zc:__cplusplus /O2 /GL /Zc:inline /W3 /permissive- /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
CreateProcess failed: The system cannot find the file specified.
ninja: build stopped: subcommand failed.
actboy168 commented 1 year ago

用YDWE的编译工具来编译

yuyuko-C commented 1 year ago

刚去试了一下, 发现完全不知道该怎么做... 不麻烦你了, 谢谢act.

luciouskami commented 1 year ago

刚去试了一下, 发现完全不知道该怎么做... 不麻烦你了, 谢谢act.

英萌不需要编译bee 如果你一定要编译,luamake也需要旧版本,然后路径加入path环境变量,编译应该是一次过的。另外,你改改就能用最新的bee.lua了。