On Tuesday, 5 March 2019 at 02:13:30 UTC, evilrat wrote:

This should do for MS linker

    "lflags-windows-x86_64": ["/SUBSYSTEM:CONSOLE"],
    "lflags-windows-x86_mscoff": ["/SUBSYSTEM:WINDOWS"]

For old optlink x86 it is a bit harder, you need to include special .def file that has instruction for linker, here is an example from dlangui[2], adding it with linker libs should work, probably, or maybe, or...

No, you don't need a def file. OPTLINK understands the same option:

void main() {
    import std.stdio;

`dmd hello` outputs "hello"
`dmd -L/SUBSYSTEM:windows hello` outputs nothing.

Reply via email to