I have a qt application in VS2005 which is linked using \subsystem:windows such that when I run the compiled executable it does not create a command line terminal, as well.
I would like to create a command line mode: when I start it with --nogui command line argument, then the gui is not presented but a simple command line program is run. Since the linking uses /subsystem:windows, the command line mode doesn't show any any of the std::cout outputs unless I link my executable with \subsystem:console
Is there a way to set the compilation/linking such that the same executable can either present the gui windows or behave as console application based on command line parameters?
PS. I use Qt4.2.0 and Visual Studio 2005 and the project is C++