luax
luax copied to clipboard
compile with "-t lua" failed
I want to compile my test.lua into test.exe using target "lua". So I installed lua-5.4.2 and luax-7.1.5 in my Windows 10.
Both paths to luax and lua were added to the system PATH environment variable and I could verify that they started successfully in cmd. But listing targets and compiling for target "lua" did not work. Please see the log below:
Listing targets:
>luax compile -t list
Target Interpeter / LuaX archive
--------------------- -------------------------
luax luax [NOT FOUND]
lua lua [NOT FOUND]
pandoc pandoc [NOT FOUND]
Compile for target "lua":
>luax compile -o test.exe test.lua -t lua
_ __ __ | https://cdelord.fr/luax
| | _ _ __ _\ \/ / |
| | | | | |/ _` |\ / | Version 7.1.5 (2024-09-08)
| |__| |_| | (_| |/ \ | Powered by Lua 5.4
|_____\__,_|\__,_/_/\_\ |
| Windows x86_64 gnu
scripts: test.lua
target : lua
output : test.exe
$luax:luax/luax_bundle.lua:240: attempt to get length of a nil value (local 'runtime')
stack traceback:
$luax:luax/luax_bundle.lua:240: in function 'luax_bundle.bundle'
$luax:luax/luax_cmd_compile.lua:158: in local 'compile_lua'
$luax:luax/luax_cmd_compile.lua:287: in main chunk
[C]: in ?
[C]: in function 'require'
$luax:luax/luax.lua:28: in function <$luax:luax/luax.lua:26>
(...tail calls...)