I recently updated an old project solution to use visual studio 2015. The application launches the opengl application. The application provides a separate console for output. I use the console to output the appropriate debugging information from my opengl application.
I have completely updated my project and it works correctly. My problem is that when updating my project using the Visual Studio 2015 toolkit (v140) from the Visual Studio 2013 toolkit (v120), the console does not display any information when I use any console output functions (stdio.h or iostream) . This makes debugging a little more painful.
To be clear, I can change my project to use the Visual Studio 2013 toolkit (v120), and the console will display information when I exit the console.
Does anyone have an idea of ββthe reason why the new toolkit does not allow me to see information in my console window? I wanted to configure the console differently?
A link with a nice clear, simple example of redirecting to the console. (I would give more examples, but I'm limited to links) http://asawicki.info/news_1326_redirecting_standard_io_to_windows_console.html
example of creating my console:
AllocConsole(); long lStdHandle = (long)GetStdHandle(STD_OUTPUT_HANDLE); int hConHandle = _open_osfhandle(lStdHandle, _O_TEXT); FILE *fp = _fdopen(hConHandle, "w"); *stdout = *fp; setvbuf(stdout, NULL, _IONBF, 0);
source share