#Trying to add an option to my build.zig

1 messages · Page 1 of 1 (latest)

verbal fox
#

I am trying to add to something to my build.zig so that i can compile with the "-luv" option.
I think I thought the good function, but for some reason there is a type mismatch and I can wrap my head around:
exe.setExecCmd(.{"luv"});

error: type '[]const ?[]const u8' does not support array initialization syntax exe.setExecCmd(.{"luv"});

I also get this note:

note: inferred array length is specified with an underscore: '[_]?[]const u8'

I feel like the note isnt really related to my error or am I wrong ?

finite junco
#

&.{"luv"} will fix the type error, but I think what you really want is exe.linkSystemLibrary("uv")

verbal fox
#

and yeah sour linkSystemLibrary was indeed what i needed ty

finite junco
verbal fox
#

so the note was not really a good hint there ?

finite junco
#

yeah, the error message could certainly do with some improvement ^^'

verbal fox
finite junco