C ++ / SDL使用控制台窗口进行调试 [英] C++ / SDL Debugging with console window
问题描述
我正在玩一些OpenGL,使用SDL来处理窗口/输入等。目前我正在显示任何信息,我想看到一个HUD。好吧,这是越来越繁琐,我想知道是否有一个简单的方法来打开一个单独的控制台窗口,以向我报告这些信息。
I am playing around with some OpenGL, using SDL to handle the window / input etc. Currently I am displaying any information I want to see to a HUD. Well, this is getting over-cumbersome, and I was wondering if there is a simple way to open up a separate console window to report this information to me. I am still new to C++ so go easy on me if this is an obvious one.
推荐答案
在链接器 - >系统在你的项目的属性,检查子系统是控制台(/ SUBSYSTEM:CONSOLE)。这导致在运行程序时单独启动控制台窗口。如果你当前的入口点不是 main
,那么你需要改变它,如果你这样做。
In Linker -> System in your project's properties, check that the SubSystem is "Console (/SUBSYSTEM:CONSOLE)". That causes a separate console window to be brought up when you run your program. If your current entry point isn't main
, then you'll need to change it to that if you do this though.
这篇关于C ++ / SDL使用控制台窗口进行调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!