Closed bitbegin closed 7 years ago
If your question related to the Windows system, you can take a look here: rust-lang/cargo#2986.
The following attribute has been valid since 1.14 and will be stable in 1.18:
#![windows_subsystem="windows"] // it is "console" by default
extern crate sciter;
fn main() { ... }
Alternatively you can set RUSTFLAGS
to
rem for MSVC target
set RUSTFLAGS=-C link-arg=-subsystem:windows -C link-arg=-entry:mainCRTStartup
rem for Mingw target
set RUSTFLAGS=-C link-args=-Wl,--subsystem,windows
among other ways.
alrealy test, but don't work
https://gist.github.com/pravic/ae568cf52773b937f3c937dc90b0566a
c:\scwindemo>dumpbin /headers target\debug\scwindemo.exe | grep -i subsystem
6.00 subsystem version
2 subsystem (Windows GUI)
c:\scwindemo>rustc -V
rustc 1.19.0-nightly (f4209651e 2017-05-05)
There is a console window, can it be hiden?