Xcode在C ++控制台中未显示任何内容 [英] Xcode not showing anything in console with C++

查看:151
本文介绍了Xcode在C ++控制台中未显示任何内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是试图将Xcode用于一个非常小的C ++项目,并想查看

I was just trying to use Xcode for a very small C++ project, and wanted to see

控制台中的一些打印件,但问题是我什么也没看到。

some prints in the console, the thing is I did not see anything.

我尝试运行一个非常简单的代码:

I tried to run a very simple code instead:

#include <iostream>

int main (int argc, char * const argv[]) {
std::cout << "Hello, World!\n";
printf("here");
return 0;
}

但在Xcode控制台中什么也没有。

but still, nothing in Xcode console.

知道为什么吗?

编辑:

添加程序快照:

编辑2:

找到了这个

并且有效:

如何在Xcode 4中运行C ++程序?

推荐答案

您的图像并不表示您已运行该程序,而仅表示您已构建该程序。查看日志浏览器(最后一个,)7),看看构建一个之后是否有调试一个的日志。要运行程序,请使用产品>运行或⌘R。

Your image doesn't show that you ran the program, only that you built it. Look at the Log Navigator (the last one, ⌘7) and see if there are any logs for 'Debug one' after 'Build one'. To run the program use Product > Run or ⌘R.

这篇关于Xcode在C ++控制台中未显示任何内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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