Since early today I have not been able to compile any C programs in Eclipse as it will not create the necessary binaries when I build a project, in fact it won't create a binaries folder at all. I have tried everything I've seen on here to try to fix it, and it's only gotten worse. Here's what I've tried so far and the results:
From "Launch Failed. Binary Not Found." Snow Leopard and Eclipse C/C++ IDE issue, in Terminal:
cd /usr/bin
sudo rm cc gcc c++ g++
sudo ln -s gcc-4.0 cc
sudo ln -s gcc-4.0 gcc
sudo ln -s c++-4.0 c++
sudo ln -s g++-4.0 g++
This was supposed to change the path to 32-bit GCC 4.0 from 64-bit 4.2. After doing this however, I had a major problem: I no longer had any type of GCC as evidenced by the fact that when I called
gcc -v
in Terminal, it returned:
-bash: gcc: command not found
In an attempt to make things right, I re-downloaded the Command Line Tools from Xcode and reinstalled them, and Xcode acknowledges that they are indeed installed. Despite this, calling gcc -v still returned -bash: gcc: command not found. After repeating this process, I got the same result, which makes it seem as if I cannot install/find the c compiler at all! It also seems that the binaries for previous C projects that worked when everything was fine disappeared after doing this.
I also tried:
Going to Project > Properties > C/C++ Build > Settings > Binary Parsers : and making sure Mach-O 64 Parser was selected.
Editing in the Miscellaneous sections of MacOS X C Linker and GCC C Compiler the flags textbox to hold "-arch i686"
None of this worked...
I am now at a loss and really stuck. If anyone can help, it would be greatly appreciated.
Thank you!