I am trying to install Eclipse Helios on Linux and I manage to get eclipse installed. However, upon running a simple hello world program, errors occurred. It says unable to find full path for g++ and gcc and thus I am unable to run the program.
Does it got to do with my linux installation or eclipse installation? Please advice. Thank you.
Or, open a DOS command prompt window (Start > Programs > Command Prompt), connect to the C: drive using the cd command, and type full. At this point you can see the PATH variable either in the User Variables or in the System Variables. Add the g++ path into either of the the PATH variables.
You need to use the which command to locate c compiler binary called gcc. Usually, it is installed in /usr/bin directory.
The above meta-package installs the number of packages including g++ automatically, gcc, and make.
Okay, Possibilities are either you didn't installed g++ before (or after) installing eclipse or the path was not detected by eclipse. Since Eclipse's installation itself does not include g++ you need to install it separately using terminal.
Also as you didn't mention which Linux are you on, I am assuming Ubuntu/Debian.Now you need to check whether g++ is installed or not on your system.To do this: Open Terminal by pressing CTRL+ALT+T and then enter the following command
g++ <some c++ filename and path> -o output
and press enter.If it compiles that means G++ is installed else it'll say command not found.In case you don't have g++ installed use this command (this is ONLY for UBUNTU and its derivatives)`
sudo apt-get install g++
Also in case of previous broken installation, first use this command`
sudo apt-get autoremove g++
and then install! Now to get the path of the newly installed compiler use this
$ which g++
and put the output path in Eclipse preferences
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With