www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - how to compile D programs without console window

reply Flaze07 <christianseiji.cs gmail.com> writes:
how do you compile a D programs without a console window ? I 
found this link
https://wiki.dlang.org/D_for_Win32 I know that you need .def 
file, but how do you link to .def ?
Jul 14 2018
parent reply rikki cattermole <rikki cattermole.co.nz> writes:
On 14/07/2018 9:32 PM, Flaze07 wrote:
 how do you compile a D programs without a console window ? I found this 
 link
 https://wiki.dlang.org/D_for_Win32 I know that you need .def file, but 
 how do you link to .def ?
WinAPI: FreeConsole(); Optlink linker (default for 32bit): -L/SUBSYSTEM:windows MSVC linker: -L/SUBSYSTEM:windows -L/ENTRY:mainCRTStartup If you're using dub, throw them into lflags and remove the -L. https://forum.dlang.org/post/gmcsxgfsfnwllplookmg forum.dlang.org
Jul 14 2018
parent reply Flaze07 <christianseiji.cs gmail.com> writes:
On Saturday, 14 July 2018 at 09:39:21 UTC, rikki cattermole wrote:
 If you're using dub, throw them into lflags and remove the -L.

 https://forum.dlang.org/post/gmcsxgfsfnwllplookmg forum.dlang.org
hmm, for some unknown reason it says that it is unable to find SUBSYSTEM:windows.lib
Jul 14 2018
parent reply evilrat <evilrat666 gmail.com> writes:
On Saturday, 14 July 2018 at 09:43:48 UTC, Flaze07 wrote:
 On Saturday, 14 July 2018 at 09:39:21 UTC, rikki cattermole 
 wrote:
 If you're using dub, throw them into lflags and remove the -L.

 https://forum.dlang.org/post/gmcsxgfsfnwllplookmg forum.dlang.org
hmm, for some unknown reason it says that it is unable to find SUBSYSTEM:windows.lib
/ (slash) is the part of a linker switch, /SUBSYSTEM:windows so in dub.json it will look like ... "lflags": [ "/SUBSYSTEM:windows" ], ...
Jul 14 2018
parent Flaze07 <christianseiji.cs gmail.com> writes:
On Sunday, 15 July 2018 at 01:20:25 UTC, evilrat wrote:
 ...
 "lflags": [ "/SUBSYSTEM:windows" ],
 ...
didn't know that, thank you
Jul 14 2018