How to install C / C++ compiler?

Joined
Apr 16, 2009
Messages
2
Reaction score
0
Points
1
Hello

Is there a guide somewhere on how to install a C / C++ compiler?

I am using the Eclipse IDE.


Thanks in advance
 
Joined
Jul 27, 2006
Messages
394
Reaction score
23
Points
18
Location
Berkshire, Uk
Your Mac's Specs
15.4" MBP Sep 09, 2.66Ghz C2D, 4Gb Ram, 320Gb HDD 7200rpm, 10.6.x / iPod Touch 8Gb
Joined
Jul 27, 2006
Messages
394
Reaction score
23
Points
18
Location
Berkshire, Uk
Your Mac's Specs
15.4" MBP Sep 09, 2.66Ghz C2D, 4Gb Ram, 320Gb HDD 7200rpm, 10.6.x / iPod Touch 8Gb
Not sure to be honest, might come with a CLI, if not try searching the support site on xcode
 
Joined
Jul 13, 2009
Messages
53
Reaction score
1
Points
8
Location
Philly
Your Mac's Specs
Macbook 13" 2.13GHz - Intel Core 2 Duo 2GB DDR2 Memory - 160GB HD - NVIDIA GeForce 9400M
Thanks, is there anything i need to do to get it working from the cli?

Installing the dev tools will give you full cli functionality.
You get commands like g++, gcc, c++ for compiling. check out their respective man pages to find out which one you need, I used gcc for compiling C++ in my programming class.
 
Joined
Sep 10, 2008
Messages
61
Reaction score
1
Points
8
Install the Unix tools and you will get a command line compiler (gcc). Install Xcode for a graphical compiler (and a whole lot more).

However, since OSX sits on top of Unix, the base install may already have gcc, g++ and c++ ready to go. A Unix box almost has to have a live c compiler just to get updates and new apps installed, but since I always install the Unix tools on any new Mac I get, I am not sure. However, an easy way to find out is to open a terminal session and enter "which gcc", "which g++" and which "c++". If the response(s) is a path, then you have the queried compiler installed.

Konan
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
However, since OSX sits on top of Unix, the base install may already have gcc, g++ and c++ ready to go.
It doesn't have a compiler pre-installed. The easiest way to get a compiler (gcc) is to install the Xcode development tools.

A Unix box almost has to have a live c compiler just to get updates and new apps installed, but since I always install the Unix tools on any new Mac I get, I am not sure.
It doesn't have to have a compiler unless it's package management system depends on one such as the BSDs or Linux distros such as Gentoo. In my experience with *nix, it is very possible to get by without using a compiler.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top