6

Is there a need to install a C/C++ compiler in Ubuntu 14.04 LTS? Where to write the program? How to compile the same?

Jos
  • 29,224
Pavan Aithal
  • 61
  • 1
  • 1
  • 2
  • 1
    do this sudo apt-get install g++ you don't need a compiler to write programs, only to compile / build. – j0h Oct 25 '15 at 14:54

1 Answers1

13

install compiler(s)

  • C and C++ and make etc.

    sudo apt-get install build-essential
    
  • Fortran

    sudo apt-get install gfortran g77
    

to edit source code

use any texteditor. From the graphical user interface for example use kate. From the commandline use nano:

nano main.cpp

to compile

g++ main.cpp -o main
user23573
  • 515
  • 1
  • 5
  • 19