Skip to content

Instantly share code, notes, and snippets.

@JimmyPesto
Last active August 31, 2020 13:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JimmyPesto/7fc31d522a1d16414a3aaa063b515ee7 to your computer and use it in GitHub Desktop.
Save JimmyPesto/7fc31d522a1d16414a3aaa063b515ee7 to your computer and use it in GitHub Desktop.
Eclipse cheat sheet

Install Eclipse CDT

Download & run Eclipse Installer: https://linuxh2o.com/how-to-install-eclipse-ide-on-linux-2020/

Block comments

Toggle "//" on all selected lines with: Ctrl + /

Refactor - rename a variable

Alt + Shift + R

CMake setup

open Marketplace and install "cmake4eclipse"
Help -> Marketplace
set Project location
new -> Project -> C++ Project
enter Project name ...
select "Executable" -> Empty Project
next -> Select Configurations (do nat change anything) -> next -> Cross GCC Command (do not change anything) -> finish
import main.cpp & CMakeList.txt to directory
Select Projekt in Project-Explorer
Project -> Preferences -> C/C++ Build -> Builder Settings -> select "Generate Makefiles automatically"
-> C/C++ Build -> Tool Chain Editor -> Current Builder -> select "CMake Builder"
C/C++ General -> Preprocessor Includes -> Check "CDT Managed Build Setting Entries [shared]" and "Move Up" to top position

select main in project explorer -> hit Build 'debug' for 'XX' project (NOT on the left hand side bit in the MIDDLE, tha hammer without Play/Stop/Textbox items)
new Binary available -> select main Binary -> hit green Play button on the left to create a run configuration
Insert "clean" Build Target to project to delete existing binaries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment