I’m on windows 11 os, my program compiles just fine. i can run the exe from the bin folder in a terminal. My problem is, is that when I run it the program opens up in a new terminal. How do i get it to run from the terminal that I am starting it from?
This is not normal. The program must run in the already open terminal.
Did you use the subsystem = .Windows
when building?
If you did, change it to subsystem = .Console
.
1 Like
I didnt touch the build.zig file. I just used it as is from zig init.
Is that something i change in the build.zig file?
Tell us more information about your terminal, shell (powershell or cmd?) and the command line used to start the program.
I use vscodes terminal but i also got the same results using powershell. I ran zig build. cd zig-out/bin. Then ran. start zata.exe
Have you tried running it without start
? According to MSDN:
start
Starts a separate Command Prompt window to run a specified program or command.
You should run it like this:
.\zata.exe
2 Likes
That works, Thank you!