Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
add comment

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++
share|improve this answer
    
Brilliant, mate. Thank you kindly. –  winarm Aug 28 '10 at 21:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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