Windows 7 x64. Prevent appearing of console with GUI application

ANtlord antlord92 at gmail.com
Tue Jul 24 08:09:33 UTC 2018


Hello! I'm trying run my GUI application getting a console 
hidden. The application is on top of GTKD, compiled with dmd 
2.081.1 in Windows 7 x64. I read a few threads on the forum and 
StackOverflow and I got that I need to add a module definition 
file [1] or to add -L/SUBSYSTEM:WINDOWS -L/ENTRY:mainCRTStartup 
options to compiler [2] or to add only /SUBSYSTEM:WINDOWS [3] or 
use a command getting console hidden [4].

Actually no one case works properly. The first one doesn't 
affect, the second "unbinds" appeared console giving ability to 
close it without closing the application, the third one raises a 
linker error about unresolved symbol WinMain, the fourth one 
hides a console but it does it with delay. Also, I tried to use 
`editbin /SUBSYSTEM:windows myapp.exe` but I it doesn't affect 
anything. Here is my dub.json [5]

So... how prevent appearing of console on the startup of the 
application?

[1] https://wiki.dlang.org/D_for_Win32
[2] 
https://forum.dlang.org/post/bhswtzoklrzzslliqkvr@forum.dlang.org
[3] 
https://forum.dlang.org/post/qcejigllwticykoiwppr@forum.dlang.org
[4] https://stackoverflow.com/a/2139903
[5] http://vpaste.net/mEy2P


More information about the Digitalmars-d-learn mailing list