如何在 Xcode 4 中设置 C++ 项目?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6282081/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I set up a C++ project in Xcode 4?
提问by mrswmmr
This probably has a really obvious answer, but I can't seem to find it. I am trying to use Xcode 4 to program with C++, and I want to create a project, build, and run it through Xcode 4 like I do for other languages. My problem is that I can't find the right type of project to do this.
这可能有一个非常明显的答案,但我似乎找不到。我正在尝试使用 Xcode 4 使用 C++ 进行编程,并且我想像其他语言一样通过 Xcode 4 创建项目、构建和运行它。我的问题是我找不到合适的项目类型来做到这一点。
回答by Ricky Bobby
Check this out : http://www.youtube.com/watch?v=Ey8LK7P1K94at 2:30 he creates a C++ project.
看看这个:http: //www.youtube.com/watch?v=Ey8LK7P1K94 在 2:30 他创建了一个 C++ 项目。
Or try this:
或者试试这个:
- Open XCode.
- File/New Project...
- In the "New Project" Assistant, expand the "Command Line Utility" group.
- Select "C++ Tool"
- Click "Next"
- Give a project name and directory, then click "Finish".
- Press Cmd-Shift-R to open the Console window. Output will appear there.
- Click the "Build and Go" toolbar button.
- 打开 XCode。
- 文件/新项目...
- 在“新建项目”助手中,展开“命令行实用程序”组。
- 选择“C++工具”
- 点击下一步”
- 给出项目名称和目录,然后单击“完成”。
- 按 Cmd-Shift-R 打开控制台窗口。输出将出现在那里。
- 单击“Build and Go”工具栏按钮。
回答by Nick Coelius
If you click around in the Mac OS part of New Project, there are a couple of options that I can see with a brief glance. Under Framework & Library there is an STL C++ Library you can access, and then under System Plug-in there's a barebones c++ plug-in you can use.
如果您在 New Project 的 Mac OS 部分中单击一下,我可以简要地看到几个选项。在 Framework & Library 下有一个您可以访问的 STL C++ Library,然后在 System Plug-in 下有一个您可以使用的准系统 c++ 插件。
Is that what you mean, or am I misinterpreting the question?
这是你的意思,还是我误解了这个问题?