How can I hide the console window in windows? #4307
Answered
by
ogoffart
Taiyangqihuo
asked this question in
Q&A
-
I write a simply native app demo in windows and use winit as the backend. After I compiled this program , when I execute it , there will be a console window behind the main window. How can I hide this console window? Should I use a winapi crate or other crates to do this? |
Beta Was this translation helpful? Give feedback.
Answered by
ogoffart
Jan 10, 2024
Replies: 1 comment 1 reply
-
You can.use See https://doc.rust-lang.org/reference/runtime.html#the-windows_subsystem-attribute |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Taiyangqihuo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can.use
#![windows_subsystem = "windows"]
in the main.rsSee https://doc.rust-lang.org/reference/runtime.html#the-windows_subsystem-attribute
And #3235