Thread overview
Compiling a GUI-only EXE
Mar 16, 2012
GreatEmerald
Mar 16, 2012
alex
Mar 16, 2012
GreatEmerald
March 16, 2012
I am trying to compile a program that uses a GUI, and I want to get rid of the console that I get every time I launch the program. I thought that passing the -WA argument to DMC would solve the issue, but it doesn't seem to be the case. I still get the console, with or without the option.

Is there something else that I'm missing here?

Note that there is output in the console, caused by libraries used by the program, but I don't think they would make the console appear by themselves (anything in stdout should simply be dropped).
March 16, 2012
On Friday, 16 March 2012 at 20:32:57 UTC, GreatEmerald wrote:
> I am trying to compile a program that uses a GUI, and I want to get rid of the
> console that I get every time I launch the program. I thought that passing the
> -WA argument to DMC would solve the issue, but it doesn't seem to be the case.
> I still get the console, with or without the option.
>
> Is there something else that I'm missing here?
>
> Note that there is output in the console, caused by libraries used by the
> program, but I don't think they would make the console appear by themselves
> (anything in stdout should simply be dropped).

try to add -LEXETYPE:NT -LSUBSYSTEM:WINDOWS to the cmd line
March 16, 2012
Aha, thanks, that led me to the right answer!

For one, it's '-L/' and not '-L' (otherwise it's a path to a custom linker). But even then, it didn't compile with both of these commands, throwing this strange message:

    Ā was unexpected at this time.

However, by trial and error I found out that passing only "-L/SUBSYSTEM:WINDOWS" did the trick!