学习在Xcode中进行编译 [英] Learning to compile in xcode

查看:69
本文介绍了学习在Xcode中进行编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在学校开始广泛使用c ++,现在我的程序已经达到了一个以上文件(即标头,驱动程序,实现文件)的程度。我对软件开发的了解不足,无法通过阅读Apple指南来了解或掌握如何设置构建过程。有人可以指导我如何在xcode中编译带有头文件和两个c ++文件的简单c ++项目吗?我首先需要制作一个makefile吗?

I have started using c++ extensively in school and now my programs are getting to the point where have more than 1 file (i.e. header, driver, implementation file). I don't know enough about software development to understand or get a grasp of how to setup the build process by looking at apple's guides. Could someone walk me through how to compile a simple c++ project with a header and two c++ files in xcode? Do I first need to make a makefile??

推荐答案

在Xcode中:


  • 选择文件->新建项目...


    • 选择Mac OS X->应用程序->命令行工具(我假设您正在制作一个使用stdin / stdout的简单C ++应用,而不是基于Cocoa的GUI)

    • 对于类型,请选择 C ++ stdc ++

    • 单击选择...并为项目指定名称和位置


    • 选择要添加到项目中的文件(标头和.cpp文件)。

    如果要使用Xcode,您将需要了解更多有关Xcode的信息。它作为您的主要IDE。有关Xcode的文档很多,但其中大多数是为创建Cocoa应用程序的人员设计的。对于开发简单的C ++控制台应用程序,您可以从 Xcode工作区指南

    You will want to learn more about Xcode if you are going to use it as your main IDE. There's a lot of documentation for Xcode, but most of it is designed for people creating Cocoa apps. For developing simple C++ console apps, you can probably start with the Xcode Workspace Guide.

    这篇关于学习在Xcode中进行编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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