Weingarten, 10-01-13
close-con – Close ConsoleAn X11 application on a *ix system always has the opportunity to drop messages to the console. This can be, for example, the shell where the application has started from. This is totally unusual for MS Windows users.
GTK+ applications compiled in MS Visual C++ open a console beside of the actual window. This is caused by the kind how GTK+/gtkmm applications are built in MS Visual C++ – as Win32 Console Application. That's useful for debugging purposes but may confuse end users. I tried the Win32 Windows Application instead but it didn't work.
I searched the W3 for a solution. All I found, was a hint to close the console.
|
Later, I realized that (even on MS Windows) it is quite useful to have a console available for debug output.
Thus, I added checks for the NDEBUG macro to close the console in the Release built and keep it open in the Debug built.
| C++ source code | |
| MS Visual C++ 2008 project file |