C and C++ programming on MacBook
Solution 1
You need to install the Mac Developer Tools either from your original Mac OS X disk or by downloading the latest version. This package includes the GCC compiler collection (supporting the C and C++ languages, amongst others).
Solution 2
You should install Apple Developers Tools.
Basically you should get a (free) developer account and then download Xcode.
Unfortunately, starting with Xcode 4, Apple is charging 5$ for the download. So you could either decide to pay this, or download the previous version (Xcode 3)
The main page for Xcode is this. There you will find links to Xcode 4 and Xcode 3 (search within the page)
Solution 3
You need to install the developer tools, which are on your MacBook DVD. Check for custom installations.
Shenoy Tinny
Updated on July 09, 2022Comments
-
Shenoy Tinny almost 2 years
I recently bought a macbook and was wondering if I can write C and C++ programs on mac without having to install anything more. Say for Java, mac came with a preinstalled version.
Is it the same for 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?
-
Andrew almost 13 yearsAsking if you can develop software without installing anything is like asking how can you keep your tires clean while driving. ANSWER: don't go anywhere.
-
meghan66 about 9 yearsI appreciate the question because I had the same question! I know Stack Overflow hates these questions but I've never coded C++ on my Macbook, only ObjC. so Thanks!
-
-
David Rodríguez - dribeas almost 13 yearsAlternatively, you can install them from the original DVDs (at least with Leopard you could install Xcode and the developer tools from the DVD)
-
Rafe Kettler almost 13 yearsNote that you can't just download this stuff anymore without paying for it. If you want to save the $5, you should use the disk that came with your laptop. @David it's the same with Snow Leopard, GCC etc. is on one of the DVDs.
-
etarion almost 13 yearsYou still can install xcode 3 for free - you just need a login. What costs you 5$ is xcode 4, and you won't find that on the dvds.
-
leanne almost 11 yearsFor anyone who comes upon this after May 21, 2013, Xcode (currently at 4.6.2) is free on the Apple Store. You just need an Apple ID to download it.
-
leanne almost 11 yearsAs of 21 May 2013, Xcode is free on the Apple Store. (It's currently at 4.6.2)