Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install gcc in Mac OS X Lion

Tags:

macos

gcc

eclipse

I am new in mac os. I have one Mac book pro. I am looking for gcc in my Mac. I already install XCode. So, C++ library already installed with XCode. But, I can not use it from outside XCode. I want to use c++ library with Eclipse. I do not know how to configure it with eclipse or how to install gcc, if I already have XCode? Should I use any other library?

Hints:

When I write following command in my terminal it shows an error.

$ gcc -v
-bash: gcc: command not found
$

Thanks, in advance.

like image 856
Shahjalal Avatar asked Apr 03 '12 17:04

Shahjalal


1 Answers

You need to install the Command Line Tools through Xcode.

From Xcode, open up Preferences, then on Downloads click "Install" next to the Command Line Tools. This assumes that you are using Xcode 4.3+.

enter image description here

like image 110
vcsjones Avatar answered Oct 19 '22 04:10

vcsjones