New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

How to install C / C++ compiler?


Post Reply New Thread Subscribe

 
Thread Tools
Duckshot

 
Member Since: Apr 16, 2009
Posts: 2
Duckshot is on a distinguished road

Duckshot is offline
Hello

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

I am using the Eclipse IDE.


Thanks in advance
QUOTE Thanks
Andy_M

 
Member Since: Jul 27, 2006
Location: Berkshire, Uk
Posts: 394
Andy_M has a spectacular aura about
Mac Specs: 15.4" MBP Sep 09, 2.66Ghz C2D, 4Gb Ram, 320Gb HDD 7200rpm, 10.6.x / iPod Touch 8Gb

Andy_M is offline
Just install xCode to compile Tools - Xcode
QUOTE Thanks
Duckshot

 
Member Since: Apr 16, 2009
Posts: 2
Duckshot is on a distinguished road

Duckshot is offline
Thanks, is there anything i need to do to get it working from the cli?

Mac Specs: Overclocked Quadcore Q6700 @ 3.6GHz. Watercooled. 2x8800 GTX in sli. OSX 10.6 4GB RAM 1066 4-4-4-12. 24" IPS panel, HP LP2475w.
QUOTE Thanks
Andy_M

 
Member Since: Jul 27, 2006
Location: Berkshire, Uk
Posts: 394
Andy_M has a spectacular aura about
Mac Specs: 15.4" MBP Sep 09, 2.66Ghz C2D, 4Gb Ram, 320Gb HDD 7200rpm, 10.6.x / iPod Touch 8Gb

Andy_M is offline
Not sure to be honest, might come with a CLI, if not try searching the support site on xcode
QUOTE Thanks
joeyboots

 
joeyboots's Avatar
 
Member Since: Jul 13, 2009
Location: Philly
Posts: 53
joeyboots is an unknown at this point
Mac Specs: Macbook 13" 2.13GHz - Intel Core 2 Duo 2GB DDR2 Memory - 160GB HD - NVIDIA GeForce 9400M

joeyboots is offline
Quote:
Originally Posted by Duckshot View Post
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.

I'm not a Mac. I'm not a PC. I'm a person.
QUOTE Thanks
Konan

 
Member Since: Sep 10, 2008
Posts: 61
Konan is an unknown at this point

Konan is offline
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
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,827
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
Quote:
Originally Posted by Konan View Post
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.

Quote:
Originally Posted by Konan View Post
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.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks

Post Reply New Thread Subscribe


« CocoaHeads in Montreal | GCC Problems! »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Cannot do a new install mth2147 OS X - Operating System 3 04-08-2009 05:56 PM
Error message when trying to install XcodeTools Reesespieces86 OS X - Apps and Games 5 03-27-2009 03:54 PM
Install validation fails and corrected DesertSage OS X - Operating System 0 10-29-2007 01:54 AM
Pismo OS X Install mateo107 Apple Notebooks 5 06-04-2006 01:36 PM
How To Install Apple X11 From Tiger Install Disks mac57 OS X - Apps and Games 18 06-03-2006 06:11 PM

All times are GMT -4. The time now is 06:55 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?