Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .