Run Eclipse CDT on Ubuntu

Overview

Operating environment

OpenJDK 11 installation

Install Java to run TOMCAT.

  1. Install OpenJDK 11.

    $ sudo apt-get install openjdk-11-jdk
    
  2. Check the Java version you have installed.

$ java --version openjdk 11.0.8 2020-07-14 OpenJDK Runtime Environment (build 11.0.8+10-post-Ubuntu-0ubuntu120.04) OpenJDK 64-Bit Server VM (build 11.0.8+10-post-Ubuntu-0ubuntu120.04, mixed mode, sharing) ~~~

Eclipse CDT installation

  1. Install Eclipse.

    $ sudo snap install eclipse --classic
    
  2. Launch Terminal on the Ubuntu desktop and launch Eclipse.

    $ eclipse
    
  3. Run the main menu "Help"> "Install New Software" to launch the "Install New Software" dialog.

  4. Click the "Add" button on the right side of the "Work with" field.

  5. Enter an arbitrary name in the "Name" field and " http://download.eclipse.org/releases/2019-12 "in the" Location "field and click the" Add "button.

  6. Check "Programming Languages"> "C / C ++ Development Tools" and click the "Next" button.

  7. The version information of the Eclipse CDT to be installed will be displayed. Click the "Next" button.

  8. Accept the license agreement and press the "Finish" button.

Project creation

  1. Execute the main menu "File"> "New"> "Project" to launch the "Project" dialog.

  2. Select "C / C ++"> "C Project" and press the "Next" button.

  3. Enter the "Project name", select "Makefile Project"> "Empty Project" for the "Project type", select "Linux GCC" for the "Toolchains", and press the "Finish" button.

  4. When asked "Open the C / C ++ prespective?", Press "Open Perspective".

  5. Copy the source code to the Eclipse workspace.

$ cp -r {source code path} ~ / eclipse-workspace / ~~~

  1. Add the following debug options to the Makefile.

    CFLAGS += -O0 -g
    
  2. Right-click on "Package Explorer" and execute "Refresh" to add the project tree on "Package Explorer".

Makefile settings

  1. Right-click on "Package Explorer" and execute "Properties" to launch the "Properties" dialog.

  2. Open the tree node "C / C ++ Build".

  3. Open the Builder Settings tab.

  4. Uncheck "Use default build command".

  5. In the Build command field, enter the make command you want to run.

  6. Uncheck "Generate Makefiles automatically" in "Makefile generation".

  7. Add the path with the Makefile to the Build directory.

  8. Open the Behavior tab.

  9. If you want to run the build on Eclipse, check "Build" and "Clean" and modify them according to the Makefile settings. If you do not want to build on Eclipse but only run or debug, uncheck "Build" and "Clean". (By default, "all" and "clean" are entered, but if you don't use them, delete them.)

Build

  1. Execute the Eclipse menu "Project"> "Clean".

  2. Execute the Eclipse menu "Project"> "Build Project".

Run

  1. Run the menu "Run"> "Run Configurations" to launch the "Run Configurations" dialog.

  2. Double-click the C ++ Application node to create a child node.

  3. Open the Main tab and set the path to the executable file.

  4. Open the Arguments tab and set the execution arguments.

  5. Press the "Apply" button.

  6. Press the "Run" button.

debug

  1. Run the menu "Run"> "Debug Configurations" to launch the "Debug Configurations" dialog.

  2. Double-click the C ++ Application node to create a child node.

  3. Open the Main tab and set the path to the executable file.

  4. Open the Arguments tab and set the execution arguments.

  5. Press the "Apply" button.

  6. Press the "Debug" button.

Recommended Posts

Run Eclipse CDT on Ubuntu
Run tiscamera on Ubuntu 18.04
Run chromium-mir-kiosk on Ubuntu Core
Run java applet on ubuntu
Run NordVPN on Docker (Windows) Ubuntu container
Until you run CuPy (v11.1) on Ubuntu 20.04
Run jooby's Eclipse development environment on Gradle
Until you run apache on ubuntu on docker
Run Ubuntu + ROS with Docker on Mac
tmux on Ubuntu
Run Mecab on Win10 + Eclipse + Java + cmecab-java (January 2020)
How to run NullpoMino 7.5.0 on Ubuntu 20.04.1 64bit version
Web Bluetooth on Ubuntu20.04
Run STS4 on Mac
Reinstall Kubernetes on Ubuntu 19.10
Use Flutter on Ubuntu
Install pyqt5 on ubuntu
Test run on rails
Install Ruby on Ubuntu 20.04
Install Autoware on Ubuntu 18.04.5
Put JetBrains on Ubuntu
Use mkdir on ubuntu
Apache2 on Ubuntu20.04 LTS
Use cpplapack on ubuntu
ubuntu on wsl part 10
Install Homebrew on Ubuntu 20.04
Run Processing on Ant
Build Zabbix on Ubuntu 20.04
Run phpunit on Docker
How to run Java EE Tutial on github on Eclipse
Run kuromoji on Win10 + Eclipse + Java environment (January 2020 version)
Using Flutter on Ubuntu (Part 2)
Create SSL certificate on Ubuntu 18.04
Building WebGIS on Ubuntu20.04 LTS
Install OpenJDK7 (JAVA) on ubuntu 14.04
Put Ubuntu 20.04.1 on Raspberry Pi 4
Run VS Code on Docker
Install Cybozu Office 10 on Ubuntu 20.4
Extend swap area on Ubuntu 18.04
Install Docker on Ubuntu Server 20.04
Ubuntu on Windows Community Preview
Japanese input on Ubuntu20.04 Desktop
Run openvpn on Docker (windows)
Oracle Java 8 on Docker Ubuntu
Install zabbix agent (5.0) on Ubuntu 18.04
Install MAV Proxy on Ubuntu 18.04
Install Arudino IDE on Ubuntu 20
Record video on ubuntu18.04 LTS
Introduced knowledge (wiki) on Ubuntu
Installing OpenMX on Ubuntu 18.04.5 LTS
Install Java on WSL Ubuntu 18.04
Ruby installation on WSL2 + Ubuntu 20.04
Install Ubuntu Desktop 20.10 on RaspberryPi4
Install Arduino IDE on Ubuntu 20.04
Ubuntu on Windows build speed
Install raspi-config on Ubuntu 20.04 (LTS)
Install WordPress 5.5 on Ubuntu 20.04 LTS
Set up ansible-playbook on Ubuntu 20.04
Install PlantUML on Intellij on Ubuntu
Install tomcat + eclipse on mac
Install Ubuntu Server 20.04 on Btrfs