Hello guys, I'm new to Zig and I wanted to try the language out.
I created a repo on github, cloned it, and ran the command zig init-exe (I'm following the language reference). It worked fine, created the files it was supposed to create, and then I ran the command zig build run and this is where I'm stuck at. I get the following output:
➜ src git:(main) ✗ zig build run
MachO Flush... error(link): undefined reference to symbol '_isatty'
error(link): first referenced in '/Users/dryfish/git/markovchain/zig-cache/o/74d3948c6911a108eadc40af9ccbec19/build.o'
error(link): undefined reference to symbol '_dup2'
error(link): first referenced in '/Users/dryfish/git/markovchain/zig-cache/o/74d3948c6911a108eadc40af9ccbec19/build.o'
error(link): undefined reference to symbol '_pthread_attr_destroy'
(...)
The (...) part is just more references to symbols that it fails to find. So the Linker is a bit messed up. I'm running on a Macbook M1 machine, I tried adding the flag -target aarch64-macos but same issues. Does someone know what I'm missing?