Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I tried to compile a cpp program through the terminal on 13.04 but got this message:

npg@NPG-ideaPad-S210:~$ gcc -o comp-LCG.cpp
The program 'gcc' can be found in the following packages:
 * gcc
 * pentium-builder
Try: sudo apt-get install <selected package>

What should I do ?

share|improve this question
1  
This says you don't have GCC installed. It already says what to do: sudo apt-get install gcc –  the_Seppi Jan 22 at 15:32

2 Answers 2

I suggest you open a terminal and do:

sudo apt-get install build-essential

Then try again.

share|improve this answer
sudo apt-get install build-essential
  1. Enter this command in a terminal window to open the gedit text editor.

    gedit progcpp.cpp
    
  2. To compile the program enter the command given below in a terminal window.

    g++ progcpp.cpp -o progcpp
    
  3. Enter the command given below to run the program.

    ./progcpp
    
share|improve this answer
    
Thanks I finally managed –  user238660 Feb 5 at 20:52

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.