Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

java

eclipse

g++

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.

like image 374
Devolus Avatar asked Mar 21 '26 13:03

Devolus


1 Answers

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

like image 61
Devolus Avatar answered Mar 24 '26 02:03

Devolus



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!