How do I disable the terminal window from showing up during execution?

Hey guys, so on Windows normally when you compile your code it generates an executable, so when I click on it it always opens up a temrinal window. I want to disable it showing a terminal window. I tried adding this to the beginning of my code:

#![windows_subsystem = "windows"]

I am using this but like it still shows the terminal window and in some cases it would open up multiple ones but this time with no output. I am not too sure why this is happening and if there is a way to stop the terminal from completely showing up at all?

I'm currently on my phone so can't do a whole lot of searching but found this that might help:

There's a workaround mentioned there. The post is quite old so there might be a better way of doing things today...

1 Like

will look into this, thanks

I copied and pasted the code and it doesn't really seem to do anything mate, sorry :frowning:

It sounds like you put the annotation in the wrong place. Where did you put it?

2 Likes