FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[Windows] Compiling GUI applications

 
Post new topic   Reply to topic     Forum Index -> General
View previous topic :: View next topic  
Author Message
Mitu



Joined: 22 Sep 2009
Posts: 59
Location: Poland

PostPosted: Thu Dec 10, 2009 12:04 pm    Post subject: [Windows] Compiling GUI applications Reply with quote

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
View user's profile Send private message
jcc7



Joined: 22 Feb 2004
Posts: 657
Location: Muskogee, OK, USA

PostPosted: Thu Dec 10, 2009 12:25 pm    Post subject: Re: [Windows] Compiling GUI applications Reply with quote

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:

Code:
-gui:4.0

(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
View user's profile Send private message AIM Address
Mitu



Joined: 22 Sep 2009
Posts: 59
Location: Poland

PostPosted: Thu Dec 10, 2009 1:17 pm    Post subject: Reply with quote

Works perfectly. Thanks! Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> General All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group