Skip to content

How to hide console window? #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bitbegin opened this issue May 13, 2017 · 3 comments
Closed

How to hide console window? #15

bitbegin opened this issue May 13, 2017 · 3 comments

Comments

@bitbegin
Copy link

There is a console window, can it be hiden?

@pravic
Copy link
Member

pravic commented May 13, 2017

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.

@bitbegin
Copy link
Author

alrealy test, but don't work

@pravic
Copy link
Member

pravic commented May 14, 2017

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants