can somebody please explain difference between those two declarations in the properties of the linker in visual studio 2008( please as simple as possible, I'm new in the world of C++) thanks in advace
edit: if possible can you give me please two small programs to show an effect
/SUBSYSTEM:CONSOLE)
is for console based applications. You should definemain
function in code./SUBSYSTEM:WINDOWS)
is for GUI applications. You should defineWinMain
function.See here. VS2008 automates some things for you which has lead to the confusion.
/SUBSYSTEM:CONSOLE results in a process with a console and /SUBSYSTEM:WINDOWS does not.
CONSOLE: Console window is shown. WINDOWS - program starts without Console window.
Edited, looking at another answers. Notice that /SUBSYSTEM flag doesn't affect the program entry point. Program entry point is defined by /ENTRY linker option. Usually /SUBSYSTEM:CONSOLE has "main" entry point, and /SUBSYSTEM:WINDOWS has "WinMain" entry point. But it is possible, for example, to create GUI application with WinMain entry point and Console window.