简体   繁体   English

C 和 C++ 在 MacBook 上编程

[英]C and C++ programming on MacBook

I recently bought a macbook and was wondering if I can write C and C++ programs on mac without having to install anything more.我最近买了一台 macbook,想知道我是否可以在 mac 上编写 C 和 C++ 程序而无需安装任何其他程序。 Say for Java, mac came with a preinstalled version.比如说 Java,mac 自带预装版本。

Is it the same for C/C++. C/C++ 是否也一样。 if yes, can you pls let me know hoe to compile and run a sample program or if not, can you please let me know what stuff to download?如果是,你能告诉我编译和运行示例程序吗?如果不是,你能告诉我要下载什么东西吗?

You need to install the Mac Developer Tools either from your original Mac OS X disk or by downloading the latest version .您需要从原始 Mac OS X 磁盘或下载最新版本来安装 Mac Developer Tools。 This package includes the GCC compiler collection (supporting the C and C++ languages, amongst others).此 package 包括 GCC 编译器集合(支持 C 和 ZF6F87C3FDCF8B3C3F07 等语言)。

You need to install the developer tools, which are on your MacBook DVD.您需要安装 MacBook DVD 上的开发者工具。 Check for custom installations.检查自定义安装。

You should install Apple Developers Tools .您应该安装Apple Developers Tools

Basically you should get a (free) developer account and then download Xcode.基本上你应该获得一个(免费)开发者帐户,然后下载 Xcode。

Unfortunately, starting with Xcode 4, Apple is charging 5$ for the download.不幸的是,从 Xcode 4 开始,Apple 收取 5 美元的下载费用。 So you could either decide to pay this, or download the previous version (Xcode 3)所以你可以决定支付这个,或者下载以前的版本(Xcode 3)

The main page for Xcode is this . Xcode 的主页是这个 There you will find links to Xcode 4 and Xcode 3 (search within the page)在那里你会找到指向 Xcode 4 和 Xcode 3 的链接(在页面内搜索)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM