Skip to content

GCC in OSX Mountain Lion

A few days ago I reinstalled OSX Mountain Lion on my MacBook Pro, and each time I do, one of the first things I re-install is “xcode“,  because it  installs GCC  on the mac. As a programmer and ethical hacker I use mainly C, but yesterday I needed C++  so as it was my first time using C++ on my mac, i decided to use xcode and it worked fine. However this morning I had to use gcc to compile some CUDA snippet, and to do so I simply opened my terminal, and tried to use gcc as a command line tool, unfortunately it didn’t worked.

I began to investigate and after a few minutes, I found out what was the problem, and here is the solution :


Install GCC in OSX Mountain Lion After Having Installed xcode :

  • Open Xcode
  • Press “command” + ‘,’  to access the options
  • Click on “Download”
  • You should now see this :

  • Now simply click on “install Command Line Tool”

and in a few minutes you will be able to use gcc in your terminal.

Post a Comment

Your email is never published nor shared. Required fields are marked *