Devolus
Devolus

Reputation: 22084

Eclipse error 'g++/gcc' not found in path

I have installed Eclipse 4.3 Juno. My environment is split into two separate workspaces. One is for Java and one for c/c++.

When I run the eclipse for C I can work with it and compile my projects.

eclipse -data d:\src\c -vmargs -Xmx512M

Now when I run the environment for Java development I suddenly get this error:

error 'g++/gcc' not found in path

The two workspaces are completely separated with their own .metadata directories.

I tried various hints that I found here and via google, like resetting the preferences, but nothing helped. Since I can work with my C environment it should be proof enough that the compiler exists. :) It is also in the PATH variable, so when I use g++/gcc on the windows commandproampt I get access denied (because it's cygwin).

So How can I get rid of this annoying error when I run my eclipse only for Java. I don't even need CDT there, but the plugins are probably installed in eclipse and not in the workspace. So this has to be some path setting or so, which I changed for the C but not for the Java environment.

Upvotes: 3

Views: 11574

Answers (2)

Devolus
Devolus

Reputation: 22084

So finally I found a solution. I got the hint from here Configure Eclipse CDT to use g++

The important bit was the comment that g++ is a symbolic link. Everything was set up ok, but when I executed g++ or gcc from the windows command prompt, I got the error "Access denied" while it worked from within cygwin.

After reading the bit about it being a symbolic link, it was clear what the problam was, because Windows can not cope with it. So what I did now, I reversed the symbolic links such that gcc and g++ is the real exe and the links of g++-3 and so on are pointing now to the exe, instead of the other way around.

I had to restart eclipse using the -clean option, then restarted it normaly and the error is history. :D

Upvotes: 1

Luke Clifford
Luke Clifford

Reputation: 112

You should install the build-essential

sudo apt-get install build-essential

after installing this, open a terminal, and type g++ (hit enter) if it says there is no input, then you got your g++

I mean, eclipse is good but problems like this are persistent I find.

Try giving NetBeans a look in.

Upvotes: 0

Related Questions