I'm trying to use the jit module jit.bcsave with luajit. Now this question has been asked here and marked as answer, but the answer did not work for me: LuaJIT on Windows 10: unknown luaJIT command or jit.*
First of all I followed the install guide LuaJit's installation guide
Installing LuaJIT Copy luajit.exe and lua51.dll (built in the src directory) to a newly created directory (any location is ok). Add lua and lua\jit directories below it and copy all Lua files from the src\jit directory of the distribution to the latter directory.
There are no hardcoded absolute path names — all modules are loaded relative to the directory where luajit.exe is installed (see src/luaconf.h).
So my folder structure is:
- luajit.exe
- lua51.dll
- lua
- jit
- bcsave.lua
Still, it won't find my modules.
I also tried adding a LUA_PATH
environment variable to .....\lua\jit
, like it's suggested in that answer of the other question. I also tried setting it to ....\lua\jit\?.lua
, but nonetheless it won't work.
My luajit is 2.0 (stable), my OS is Windows 10.
I also tried adding a LUA_PATH environment variable to .....\lua\jit, like it's suggested in that answer of the other question. I also tried setting it to ....\lua\jit\?.lua, but nonetheless it won't work.
You should add the path as ....\lua\?.lua
, because jit.bcsave
will be expanded into ....\lua\jit\bcsave.lua
.
The error message lists those paths that have been tried to locate the module, so it can be useful to review those (and include in the question in the future).