c++.windows.32-bits - Compiling a GUI-only EXE
- GreatEmerald (8/8) Mar 16 2012 I am trying to compile a program that uses a GUI, and I want to get rid ...
- alex (2/15) Mar 16 2012 try to add -LEXETYPE:NT -LSUBSYSTEM:WINDOWS to the cmd line
- GreatEmerald (7/7) Mar 16 2012 Aha, thanks, that led me to the right answer!
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).
Mar 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
Mar 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: However, by trial and error I found out that passing only "-L/SUBSYSTEM:WINDOWS" did the trick!
Mar 16 2012