How to install gcc in Mac OS X Lion

12,802

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

Share:
12,802
Shahjalal
Author by

Shahjalal

I am too curious to solve my problems. The real interest on the technologies, amazed me - Python, Django, Docker, Jenkins, Amazon Web Services (AWS), etc,

Updated on June 09, 2022

Comments

  • Shahjalal
    Shahjalal almost 2 years

    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.