When I try to compile a Hello World program in emacs, using

g++ -Wall Hello.cpp

I receive the following error:

/bin/bash: g++: command not found Compilation exited abnormally with code 127

I get the same error with the c++ command substituted for g++, as well as when I create a makefile

hello: Hello.cpp g++ -Wall -g Hello.cpp -o hello

I am new to linux and emacs. Using GNU Emacs 23.2.1 (i386-redhat-linux-gnu, GTK+ Version 2.20.1) on Fedora 13 OS.

I just want to write and execute simple C++ programs to teach myself, since I take it this computer fad is not going away.

Thanks in advance.

link|improve this question

71% accept rate
feedback

1 Answer

up vote 3 down vote accepted

It looks like you have not installed g++. Run the following command to install g++ on Fedora:

yum install gcc-c++
link|improve this answer
Brilliant, mate. Thank you kindly. – winarm Aug 28 '10 at 21:44
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.