sciter-sdk / rust-sciter

Rust bindings for Sciter
https://sciter.com
MIT License
804 stars 76 forks source link

How to hide console window? #15

Closed bitbegin closed 7 years ago

bitbegin commented 7 years ago

There is a console window, can it be hiden?

pravic commented 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.

bitbegin commented 7 years ago

alrealy test, but don't work

pravic commented 7 years ago

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)