当前位置: 动力学知识库 > 问答 > 编程问答 >

Visual Studio Release configuration C++ project has no command window

问题描述:

I have an OpenGL project written in C++ building in Visual Studio 2013. My project has several cout statements that print useful information.

When I compile and run the debug version of my app, two new windows pop up: one window showing the OpenGL visuals for my app, and a second command window showing my cout output.

When I compile and run in release mode, however, only the OpenGL window pops up but there is no command window! Where is my cout spew going to?

I've scanned the vcxproj file and haven't found anything different between the Release and Debug configurations that could affect this (or so I think). How can I view my cout spew in my Release configuration?

网友答案:

The debug configuration was set to "/SUBSYSTEM:console" and the release configuration was set to "/SUBSYSTEM:windows". Going to "Project > Properties > Configuration Properties > Linker > System > SubSystem" and editing the value for the release configuration fixed it!

网友答案:

Have you looked at the /Visual Studio/Projects/Project_Name/release folder ? I'm not sure but maybe you can find an executable in there.

分享给朋友:
您可能感兴趣的文章:
随机阅读: