digitalmars.D.learn - subsystem:windows and writeln
- Domain (3/3) Nov 16 2018 When I link the app with /subsystem:windows, and all writeln and
- Adam D. Ruppe (4/5) Nov 16 2018 Why?
- Domain (2/7) Nov 16 2018 But I cannot control the 3rd library!
- Adam D. Ruppe (8/9) Nov 16 2018 Hmm, I see.
- Adam D. Ruppe (2/2) Nov 16 2018 BTW if you just want to ditch the output, you might be able to
- Andre Pany (6/9) Nov 17 2018 Another option is to enhance / correct the third party component
When I link the app with /subsystem:windows, and all writeln and writefln will cause a enforcement failed (stdio.d:2889). I think this is unacceptable.
Nov 16 2018
On Friday, 16 November 2018 at 17:36:01 UTC, Domain wrote:I think this is unacceptable.Why? You are asking it to write to a file that doesn't exist... you probably shouldn't be doing that...
Nov 16 2018
On Friday, 16 November 2018 at 17:46:20 UTC, Adam D. Ruppe wrote:On Friday, 16 November 2018 at 17:36:01 UTC, Domain wrote:But I cannot control the 3rd library!I think this is unacceptable.Why? You are asking it to write to a file that doesn't exist... you probably shouldn't be doing that...
Nov 16 2018
On Friday, 16 November 2018 at 17:49:06 UTC, Domain wrote:But I cannot control the 3rd library!Hmm, I see. So one possibility would be to reopen stdout (and maybe stderr) to a different file. stdout.reopen("log.txt", "wt"); when you start your program and before you call the library and it should no longer error - unless it can't create the file. Then you can look at the file if you do need the output.
Nov 16 2018
BTW if you just want to ditch the output, you might be able to use "NUL" as the file name. I havent' tried tho.
Nov 16 2018
On Friday, 16 November 2018 at 17:36:01 UTC, Domain wrote:When I link the app with /subsystem:windows, and all writeln and writefln will cause a enforcement failed (stdio.d:2889). I think this is unacceptable.Another option is to enhance / correct the third party component if possible. You could create a github issue for the developer to make him/her aware of the issue. Kind regards Andre
Nov 17 2018