Hello!
I'm running "zig build-exe src/main.zig" after running all steps up to here: https://pedropark99.github.io/zig-book/Chapters/01-zig-weird.html#sec-compile-code
Is this resource (which I got from the top of the online learning resources on the zig website) incorrect / out of date or does this mean
that my zig installation is incorrect?
zig version
0.15.2
mkdir hw
cd hw
zig init
info: created build.zig
info: created build.zig.zon
info: created src/main.zig
info: created src/root.zig
info: see `zig build --help` for a menu of options
# zig build works
zig build
./zig-out/bin/hw
All your codebase are belong to us.
Run `zig build test` to run the tests.
# zig build-exe does not
zig build-exe src/main.zig
src/main.zig:2:20: error: no module named 'hw' available within module 'main'
const hw = @import("hw");
^~~~
referenced by:
main: src/main.zig:7:9
callMain [inlined]: /home/user/.local/bin/lib/std/start.zig:627:37
callMainWithArgs [inlined]: /home/user/.local/bin/lib/std/start.zig:587:20
posixCallMainAndExit: /home/user/.local/bin/lib/std/start.zig:542:36
2 reference(s) hidden; use '-freference-trace=6' to see all references
./main
zsh: exec format error: ./main