什么可以解释std :: cout不显示什么? [英] What can explain std::cout not to display anything?

查看:415
本文介绍了什么可以解释std :: cout不显示什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无论什么原因,std :: cout不会显示任何与我的应用程序。

For whatever reason, std::cout does not display anything with my application. The description of my development environment follows.

我正在使用Qt Creator开发一个Qt应用程序。由于Qt Creator无法从我的站(XP64)启动,我目前正在开发它与Visual Studio 2008和Qt插件(通过导入.pro项目文件)。一切似乎很好,应用程序工作。

I am working on a Qt application using Qt Creator. Since Qt Creator can't be launched from my station (XP64), i am currently developping it with Visual Studio 2008 and the Qt plugin (by importing the .pro project file). Everything seems fine and the application works.

在某些情况下(根据命令行参数),我不想启动HIM,只是显示一些句子在CLI(例如命令行所需的参数)。

In some cases (depending on command line arguments), i don't want to launch the HIM, just to display a few sentences in the CLI (command line required arguments, for instance).

我没有收到任何错误,但没有任何显示。
我确信运行的相应代码是(classical)如下:

I don't get any error, but nothing is displayed. The corresponding code, which i am sure is run is the (classical) following :

std::cout << "is this going to be displayed ?" << std::endl;

你有什么想法为什么没有显示?

Do you have any idea why nothing is displayed ?

推荐答案

好的,找到答案。简单的答案,当然,一如既往遇到这样的问题。

Ok, answer found. Simple answer, of course, as always when encountering such problems. Michael Aaron was on the right tracks.

只要在项目配置(/配置属性/链接器/系统)中将SubSystem更改为控制台,就可以使整个事情发挥作用。 GUI仍然可以工作,但使用后台控制台。我可以处理。

Simply changing SubSystem to Console in project configuration (/Configuration properties/Linker/System) makes the whole thing work. The GUI still works, but with a background console. I can deal with that.

这篇关于什么可以解释std :: cout不显示什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆