eclipse :Program "g++" not found in PATH

I've already install the gcc, g++ compiler, and jdk, but I just write a simple test, eclipse find problem, but it can run through it detect problem
1
2
3
4
5
6
7
8
9
10
11
#include <iostream>

using namespace std;

int main() {
	cout << endl;
	cout << endl;
	cout << "kill them all." << endl;

	return 0;
}



in the ecplise problem tab, it says :
Program "g++" not found in PATH
Symbol 'cout' could not be resolved kill.cpp /an line 12 Semantic
Symbol 'cout' could not be resolved kill.cpp /an line 14 Semantic
Symbol 'cout' could not be resolved kill.cpp /an line 13 Semantic



here's my compiler:
root@yuan:/usr/bin# ls -l gcc* g++* cpp*
lrwxrwxrwx 1 root root 7 Oct 28 14:25 cpp -> cpp-4.7
-rwxr-xr-x 1 root root 531692 Sep 22 01:35 cpp-4.7
lrwxrwxrwx 1 root root 7 Oct 29 13:19 g++ -> g++-4.7
-rwxr-xr-x 1 root root 531692 Sep 22 01:37 g++-4.7
lrwxrwxrwx 1 root root 7 Oct 28 14:25 gcc -> gcc-4.7
-rwxr-xr-x 1 root root 527596 Sep 22 01:39 gcc-4.7
-rwxr-xr-x 1 root root 21996 Sep 22 01:39 gcc-ar-4.7
-rwxr-xr-x 1 root root 21996 Sep 22 01:39 gcc-nm-4.7
-rwxr-xr-x 1 root root 21996 Sep 22 01:39 gcc-ranlib-4.7
I'm confused, when I reinstall ubuntu, I use the say way install everything but it didn't work, please help me.

It's so weird, I reextract again the eclipse.atr.gz, so there's two eclipse folders , when I use the new eclipse, it still doesn't work out, and then i delete them all, and reextract again, OMG, it work, and there's no error, what's the matter with eclipse??
tyuiro
Topic archived. No new replies allowed.