I want the exe generated by zig build-exe to be located in other location than the current working directory (for example zig build-exe main.c). What argument should I use? It needs to be CLI, not build.zig. To sum up, I want something like zig build-exe main.c -o main. I'd prefer to avoid passing arguments to clang if possible. Thanks
#Tell zig build-exe where to produce the executable (or where to copy)
1 messages · Page 1 of 1 (latest)
Are you trying to use zig a cc alternative? If so, just use zig cc with normal clang arguments.
For this case yeah, but as I said, I'd prefer to avoid clang arguments
-femit-bin=path
I tried but ```zig build-exe -cflags -std=c2x -g -femit-bin=exe -- /home/david/dev/nativity/nat/shifts.c
PANIC:
Zig command exited with code 1:
:1:1: error: unknown argument: '-femit-bin=exe'
oh shit
nvm
my bad
I didn't terminate the cflags properly
yeah, thanks for the rubber duck 🙂