-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Hey there, I'm trying to build this on Windows with Zig 0.14.0, and encountering some errors.
My Zig version is: 0.14.0-dev.2210+62f4a6b4d
Attempting to run zig build in the ./build folder results in:
F:\Cali\Luau.NET\build\build.zig:28:9: error: local variable is never mutated
var luacode_api_flag = if (lib.target.isWindows()) "-DLUA_API=extern\"C\" __declspec(dllexport) " else "-DLUACODE_API=extern\"C\"";
^~~~~~~~~~~~~~~~
F:\Cali\Luau.NET\build\build.zig:28:9: note: consider using 'const'
F:\Cali\Luau.NET\build\build.zig:27:9: error: local variable is never mutated
var lua_api_flag = if (lib.target.isWindows()) "-DLUA_API=extern\"C\" __declspec(dllexport) " else "-DLUA_API=extern\"C\"";
^~~~~~~~~~~~
F:\Cali\Luau.NET\build\build.zig:27:9: note: consider using 'const'
It appears that in Zig 0.12.0, not mutating var variable will result in an error until you change them to const's, so I've changed them to const locally to get past this.
After that change, I am now running into:
F:\Cali\Luau.NET\build\build.zig:27:34: error: no field named 'target' in struct 'Build.Step.Compile'
const lua_api_flag = if (lib.target.isWindows()) "-DLUA_API=extern\"C\" __declspec(dllexport) " else "-DLUA_API=extern\"C\"";
^~~~~~
C:\Tools\zig 0.14.0\lib\std\Build\Step\Compile.zig:1:1: note: struct declared here
Due to my unfamiliarity with either of these tools, I'm not really sure what the next thing to look at here would be and I'm hoping that I can get some help here if it's not too bothersome. I can submit a PR for the var -> const change, but would like to wait until after this if there are more changes required.
Metadata
Metadata
Assignees
Labels
No labels