Eclipse IDE for C/C++ Developers installation on Ubuntu 20.04

In this tutorial you will learn how to install the latest version of Eclipse IDE for C/C++ Developers on Ubuntu 20.04 Focal Fossa Linux Desktop.

In this tutorial you will learn:

  • How to install Eclipse IDE prerequisites
  • How to download Eclipse IDE for C/C++ Developers
  • How to extract Eclipse IDE for C/C++ Developers package
  • How to launch Eclipse IDE
  • How to create Eclipse IDE desktop launcher

Eclipse IDE for C/C++ Developers on Ubuntu 20.04

Eclipse IDE for C/C++ Developers on Ubuntu 20.04

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Installed or upgraded Ubuntu 20.04 Focal Fossa
Software Eclipse IDE for C/C++ Developers
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

Eclipse IDE for C/C++ Developers installation on Ubuntu 20.04 step by step instructions

  1. Eclipse IDE requires Java JRE as a prerequisite. Therefore, our first step is to install default-jre package. To do so run the bellow command:
    $ sudo apt install default-jre
    
    Installation of Eclipse java prerequisite

    Installation of Eclipse java prerequisite

    Furthermore, confirm that your system has G++ the C++ compilers installed.



  2. download the 64-bit Eclipse IDE for C/C++ Developers package

    Navigate to the official Eclipse website and download the 64-bit Eclipse IDE for C/C++ Developers package.

  3. Extract the Eclipse package downloaded in the previous step. Here we assume that the package has been downloaded into the Downloads directory.

    Extract the package into the /opt directory:

    $ sudo tar xf eclipse-cpp-2019-12-R-linux-gtk-x86_64.tar.gz -C /opt
    

    Once the package has been extracted create a symbolic link to the /opt/eclipse/eclipse executable binary:

    $ sudo ln -s /opt/eclipse/eclipse /usr/local/bin/
    
    Extract Eclipse IDE package and link to executable binary

    Extract Eclipse IDE package and link to executable binary

    From now on you should be able to start the Eclipse IDE simply by execution of the bellow command:

    $ eclipse
    
    Start Eclipse IDE for C/C++ Developers from command line

    Start Eclipse IDE for C/C++ Developers from command line



  4. (optional) Create Eclipse IDE for C/C++ Developers desktop launcher. As an administrator create a new file called /usr/share/applications/eclipse.desktop using any text editor eg. nano:
    $ sudo nano /usr/share/applications/eclipse.desktop
    

    and insert the following code:

    [Desktop Entry]
    Version = 2019‑12
    Type = Application
    Terminal = false
    Name = Eclipse C/C++
    Exec = /usr/local/bin/eclipse
    Icon = /opt/eclipse/icon.xpm
    Categories = Application;
    
    Creating Eclipse IDE desktop launcher

    Creating Eclipse IDE desktop launcher

    start the the Eclipse IDE

    Once the Eclipse IDE desktop launcher is ready you can start the the Eclipse IDE by searching the top left Activities menu.

  5. Eclipse IDE for C/C++ Developers application select your work space

    Once you start the Eclipse IDE for C/C++ Developers application select your work space.



    create a new C/C++ project

    Navigate to File-->New-->C/C++ Project to create a new C/C++ project.