如何在Xcode 4中设置一个c++项目?

时间:2023-01-13 12:31:03

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运行它,就像我对其他语言所做的那样。我的问题是我找不到合适的项目类型来做这件事。

2 个解决方案

#1


43  

Check this out : http://www.youtube.com/watch?v=Ey8LK7P1K94 at 2:30 he creates a C++ project.

看看这个:http://www.youtube.com/watch?2点30分,他创建了一个c++项目。

Or try this:

或者试试这个:

  1. Open XCode.
  2. 打开XCode。
  3. File/New Project...
  4. 文件/新项目……
  5. In the "New Project" Assistant, expand the "Command Line Utility" group.
  6. 在“新项目”助理中,展开“命令行实用程序”组。
  7. Select "C++ Tool"
  8. 选择“c++工具”
  9. Click "Next"
  10. 点击“下一步”
  11. Give a project name and directory, then click "Finish".
  12. 给出项目名称和目录,然后单击“Finish”。
  13. Press Cmd-Shift-R to open the Console window. Output will appear there.
  14. 按Cmd-Shift-R打开控制台窗口。产量将会出现。
  15. Click the "Build and Go" toolbar button.
  16. 单击“构建和Go”工具栏按钮。

#2


3  

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.

如果你在新项目的Mac OS部分点击一下,我可以看到一些选项。在框架和库中,有一个STL c++库,您可以访问它,然后在系统插件的下面有一个您可以使用的barebones c++插件。

Is that what you mean, or am I misinterpreting the question?

你是这个意思,还是我误解了这个问题?

#1


43  

Check this out : http://www.youtube.com/watch?v=Ey8LK7P1K94 at 2:30 he creates a C++ project.

看看这个:http://www.youtube.com/watch?2点30分,他创建了一个c++项目。

Or try this:

或者试试这个:

  1. Open XCode.
  2. 打开XCode。
  3. File/New Project...
  4. 文件/新项目……
  5. In the "New Project" Assistant, expand the "Command Line Utility" group.
  6. 在“新项目”助理中,展开“命令行实用程序”组。
  7. Select "C++ Tool"
  8. 选择“c++工具”
  9. Click "Next"
  10. 点击“下一步”
  11. Give a project name and directory, then click "Finish".
  12. 给出项目名称和目录,然后单击“Finish”。
  13. Press Cmd-Shift-R to open the Console window. Output will appear there.
  14. 按Cmd-Shift-R打开控制台窗口。产量将会出现。
  15. Click the "Build and Go" toolbar button.
  16. 单击“构建和Go”工具栏按钮。

#2


3  

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.

如果你在新项目的Mac OS部分点击一下,我可以看到一些选项。在框架和库中,有一个STL c++库,您可以访问它,然后在系统插件的下面有一个您可以使用的barebones c++插件。

Is that what you mean, or am I misinterpreting the question?

你是这个意思,还是我误解了这个问题?