c-smile / sciter-sdk

Sciter is an embeddable HTML/CSS/scripting engine
http://sciter.com
Other
2.11k stars 223 forks source link

TWO windows appear #64

Closed hasanOryx closed 6 years ago

hasanOryx commented 6 years ago

I tried loading a simple html file using Rust, it is loading fine at cargo run, but once I run the .exe alone, 2 windows appear, one empty as cmd and one shows the real output as shown in this pic.

I'm using Windows 10 x64

image

c-smile commented 6 years ago

It appears as you have compiled your executable as console app so Windows creates console window for it (that second black window).

Your compilation command line should look like: cargo rustc -- -Clink-args="/SUBSYSTEM:WINDOWS"

Check this: https://github.com/rust-lang/rfcs/blob/master/text/1665-windows-subsystem.md

hasanOryx commented 6 years ago

I compiled it as 'cargo build --release' will check using the one you provided and confirm you back, thanks

pravic commented 6 years ago

Or #![windows_subsystem="windows"], see sciter-sdk/rust-sciter#21.

hasanOryx commented 6 years ago

Thanks @pravic that solved it.