View previous topic :: View next topic |
Author |
Message |
Mitu
Joined: 22 Sep 2009 Posts: 59 Location: Poland
|
Posted: Thu Dec 10, 2009 12:04 pm Post subject: [Windows] Compiling GUI applications |
|
|
By default when I compile application using for example dmd main.d command, the program opens in a console.
What arguments should I pass to the compiler/linker to make it not show the console window on double-clicking the output exe? |
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Thu Dec 10, 2009 12:25 pm Post subject: Re: [Windows] Compiling GUI applications |
|
|
Mitu wrote: | By default when I compile application using for example dmd main.d command, the program opens in a console.
What arguments should I pass to the compiler/linker to make it not show the console window on double-clicking the output exe? |
According to Wiki4D...
How to suppress the console window with a Windows application
There are at least 3 ways to keep the console window from appearing.
(1) Add -L/EXET:NT -L/SU:windows to the command line (Charles Sanders, NG:D/20386):
Code: | dmd -L/EXET:NT -L/SU:windows myWinApp.d |
(2) Or create a .def file like the following and add the .def file to the command line:
Code: | EXETYPE NT
SUBSYSTEM WINDOWS |
Code: | dmd myDef.def myWinApp.d |
(3) If you're using Bud to compile your application, an easier way is to add the following to bud's command line:
(The version number 4.0 specifies that the application should be allowed to run on Windows 95 or above. Leaving off the version number will cause your operating system to be chosen as the minimum allowed Windows version, which might be bad.) |
|
Back to top |
|
|
Mitu
Joined: 22 Sep 2009 Posts: 59 Location: Poland
|
Posted: Thu Dec 10, 2009 1:17 pm Post subject: |
|
|
Works perfectly. Thanks! |
|
Back to top |
|
|
|