Pergunta

I'm working on a legacy project that uses Poco in Visual Studio 2008 alongside MFC. I've added some debugging and SimpleFileChannel works fine but WindowsConsoleChannel doesn't seem to open a Windows console when I run the app. Is this a known issue or is there something else I need to do?

Foi útil?

Solução

Turns out that the console is normally disabled in a GUI program. You can turn it on by using EditBin. To do this automatically right click on the project then select Properties->Configuration Properties->Build Events->Post-Build Event and set Command Line to "editbin /SUBSYSTEM:CONSOLE $(OUTSIR)\YourAppName.exe

See this article for details: http://www.codeproject.com/Articles/10073/Console-Output-from-a-GUI-program

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top