Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse with CDT on Mac

I've been trying to get Eclipse with CDT working on my Mac for a while now. Everything I've searched for talks about Windows and I'm officially stuck.

The errors I get are:

Program "g++" not found in PATH

Program "gcc" not found in PATH

and a few more that seem to stem from a problem with my PATH. I checked gcc, g++, make, and gmake in terminal using --version and they're all installed. Eclipse CDT is supposed to detect where to look for PATH variables and I can't figure out where I would change it or how to change it. Any help would be greatly appreciated!

Edit: The original problem was fixed. My PATH variable in eclipse was empty for some reason so I had to add locations like /usr/bin and /usr/local/bin. Now I get the error that "Symbol 'cout' could not be resolved."

Edit 2: I was able to get everything working by uninstalling everything and reinstalling Eclipse Indigo with CDT.

like image 310
zachdini Avatar asked Dec 06 '12 00:12

zachdini


People also ask

Can you use Eclipse on Mac?

If the Eclipse Foundation is the Publisher, you are good to select Run. For Mac and Linux users, you will still need to unzip the download to create the Installer. Start the Installer once it is available.

What is CDT in Eclipse?

The CDT is Eclipse's C/C++ Development Tooling project. It is an industrial-strength C/C++ IDE that also serves as a platform for others to provide value-added tooling for C/C++ developers.


1 Answers

There is no C / C++ compiler installed.

Options are:

  1. Install gcc from here (best): https://github.com/kennethreitz/osx-gcc-installer
  2. Install all of Xcode (1 gig install)
  3. Install command line tools only from Xcode https://developer.apple.com/downloads/index.action

Once installed make sure you can call the compiler from the command line (type gcc) if it does not work the compiler has not been added to the environment path variable.

Some extra help: How do I install g++ on MacOS X?

like image 58
oden Avatar answered Oct 04 '22 02:10

oden