如何使用 Xcode 5 构建 makefile 项目?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21617017/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 04:38:06  来源:igfitidea点击:

How can I build a makefile project with Xcode 5?

c++xcode

提问by yuyang

I would like to use Xcode to debug a C++ program step by step. The project can be build using make. How can I build it using Xcode 5?

我想用Xcode一步一步调试一个C++程序。该项目可以使用 make 构建。如何使用 Xcode 5 构建它?

回答by Treesrule14

Here are the steps

以下是步骤

1) create a new project using the following a) go to OS X other b) Create an empty project

1) 使用以下创建一个新项目 a) 转到 OS X 其他 b) 创建一个空项目

2) create a blank file (under OS X other again) and call it Makefile

2)创建一个空白文件(再次在OS X other下)并将其命名为Makefile

3) create a new target (file -> new -> target - call it whatever you want) go to OS X target and select external build system

3)创建一个新目标(文件 -> 新建 -> 目标 - 随便你怎么称呼它)转到 OS X 目标并选择外部构建系统

4) If you want a particular PATH variable you can Add a new user define setting (under editor -> add Build Setting -> Add user defined setting

4)如果你想要一个特定的 PATH 变量,你可以添加一个新的用户定义设置(在编辑器下 -> 添加构建设置 -> 添加用户定义设置

5) This should enable your target to be the makefile

5)这应该使您的目标成为makefile