It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center。
7年前关闭。
我对Xcode环境非常陌生。我想编译一些.c和.cpp文件。因此,我使用通用c ++插件创建了一个项目(这是正确的选择吗?)。它成功构建了文件,但是即使对于“ hello world” printf文件,也没有显示结果。有人可以帮忙吗?如果有人可以推荐一些好的教程,那就太好了!
这是我的示例代码:
7年前关闭。
我对Xcode环境非常陌生。我想编译一些.c和.cpp文件。因此,我使用通用c ++插件创建了一个项目(这是正确的选择吗?)。它成功构建了文件,但是即使对于“ hello world” printf文件,也没有显示结果。有人可以帮忙吗?如果有人可以推荐一些好的教程,那就太好了!
这是我的示例代码:
#include <stdio.h>
int main (){
printf("Hello World");
return 0;
}
最佳答案
您应该创建一个Command Line Tool
项目,而不是通用C ++插件。
完成此操作后,您的输出将显示在xcode的控制台窗口中。