From EdWiki

An Introduction to Eclipse

Eclipse IDE

Eclipse is a versatile, open, extensible, multi-language software development environment comprising an integrated development environment (IDE) and an extensible plug-in system. It is written mostly in Java. It can be used to develop applications in Java and, by means of various plug-ins, other programming languages including Ada, C, C++, COBOL, Perl, PHP, Python, R, Ruby (including Ruby on Rails framework).

The Eclipse Platform uses plug-in architecture to provide all functionality within and on top of the runtime system, in contrast to some other applications, in which functionality is hard coded. The Eclipse Platform's runtime system is based on Equinox, an implementation of the OSGi core framework specification.

With the exception of a small run-time kernel, everything in Eclipse is a plug-in. This means that every plug-in developed integrates with Eclipse in exactly the same way as other plug-ins. Eclipse provides plug-ins for a wide variety of features, some of which are through third parties using both free and commercial models.


A C/C++ IDE or Integrated Development Environment integrates the editor, compiler tool chain and the debugger into one package. For the past decade or more, this has been the favoured approach to debug embedded systems using a cross development approach with either dedicated hardware on the embedded processor and/or an in circuit emulator.

Eclipse IDE for C and C++ Development

The Eclipse C/C++ Development Toolkit (CDT) is a set of Eclipse plug-ins that provide C and C++ extensions to the Eclipse workbench. It provides a powerful open source technology framework for embedded C and C++ software development environments. The Eclipse environment in general and CDT in particular not an integrated development environment (IDE) and is not a product (it doesn't have compiler. debugger, etc.) on its own though - this is a common misconception. But it does provide the frameworks that allow such tools to be integrated in a consistent fashion.

Eclipse CDT IDE becomes a complete solution only when we integrate the required toolchain (compiler. debugger, etc.) which allows us to control the entire edit, build, and debug process for our embedded project.

The Eclipse C/C++ Development Tools (CDT) runs on top of the Eclipse Platform. The CDT provides advanced functionality for C/C++ developers, including:

  • C/C++ Editor (basic functionality, syntax highlighting, code completion etc.)
  • C/C++ Debugger (APIs & Default implementation, using GDB)
  • C/C++ Launcher (APIs & Default implementation, launches and external application)
  • Parser
  • Search Engine
  • Content Assist Provider
  • Makefile generator

Perspectives, Views, and Editors

Collectively, the combination of various views (e.g, Project Explorer, Task List, Outline, Problems and Console) and editors (used to work with various resources) visible within the Eclipse workbench are known as a perspective. A perspective can be thought of as one page with in the Eclipse workbench. Multiple perspectives can be open at one time, and each has an icon visible in the perspective toolbar at the upper right corner of the workbench window. The perspective that is currently active has its name shown in the title bar of the window and its icon appears selected.

Every perspective has its own set of views, but open editors are shared by all open perspectives. Only a single instance of any one view can be open in a given perspective, while any number of editors of the same type can be open at one time.

Views are typically used to navigate resources and modify properties of a resource. Any changes made within a view are saved immediately. By contrast, editors are used to view or modify a specific resource and follow the common open-save-close model.

Eclipse CDT Build system

What does Building mean?

In C/C++ context, it can be plainly Compiling and Linking. If a C source file changes, only that file gets compiled. If a C header file changes, every source file that includes it (directly or indirectly) gets compiled. It may also involves creating libraries/DLLs/Shared Objects.

Eclipse CDT mainly supports two types of builds:

  • Managed Build
    • Eclipse manages every thing.
    • Eclipse Gives a GUI to change the paramters, options, etc.
  • Externally Managed Build
    • Eclipse let’s other tool(s) do every thing
    • Common for Existing projects where a build system (make file based) is already in place.

Eclipse CDT Managed Build

With Eclipse managed build, Eclipse can automatically create a set of make files. These make files can be used with standard make utility. This is the easiest way to create (build) a new Project for beginners. But it only works with GCC and other Eclipse supported tool-chains (Cygwin GCC, Linux GCC, MacOSX GCC, MinGW GCC, and Solaris GCC).

CDT gives a GUI to:

  • Manage the build
  • Selectively exclude/include some files from build.
  • Maintain build configurations

Externally Managed Build

Build systems not managed by Eclipse.

  • Recommended for existing projects based on make files.
  • Any build system that supports command line build can be covered using this mechanism.
  • It involves these steps:
    • Add the source within Eclipse
    • Tell Eclipse how to build it.

CDT Projects

Projects contain and manage programs that are to be combined together to create a single executable program (or a library). Typically one creates a new project for each programming task rather than re-using existing projects.

Before you can work in the CDT, you must create a project to store your source code, makefiles, binaries, and related files. C/C++ projects are displayed in the C/C++ Projects view.

Project types

To build your project, you can either create your own makefile, or let CDT generate the makefiles for you automatically.

When you create a new project, you are required to specify the project type. This project type will determine the toolchain and data, and tabs that the CDT uses. In the New CDT Project Wizard, you can choose from the following project types:


Provides an executable application. This project type folder contains three templates.

  1. Hello World C++ Example provides a simple C++ Hello World application with main().
  2. Hello World ANSI C Example provides a simple C Hello World application with main().
  3. Empty Project provides a single source project folder that contains no files.

After you select a template, the result is a project with only the meta-data files required for the project type. You are expected to modify these source files, as required, and provide source files for the project's target. The makefile for the Executable project type is automatically created by the CDT.

Shared Library

An executable module that is compiled and linked separately. When you create a project that uses a shared library (, you define your shared library's project as a Project Reference for your application. For this project type, the CDT combines object files together and joins them so they're relocatable and can be shared by many processes. Shared libraries are named using the format, where version is a number with a default of 1. The file usually is a symbolic link to the latest version. The makefile for this project type is automatically created by the CDT.

Static Library

A collection of object files that you can link into another application (libxx.a). The CDT combines object files (i.e. *.o) into an archive (*.a) that is directly linked into an executable.The makefile for this project type is automatically created by the CDT.

Makefile Project

Creates an empty project without the meta-data files. This selection is useful for importing and modifying existing makefile-based projects; a new makefile is not created for this project type.


Eclipse IDE for C/C++ Developers
Linux x86 32-bit
Linux x86 64-bit
Windows x86 32-bit
Windows x86 64-bit

Eclipse - How-Tos

Eclipse - How-Tos
Installing Eclipse
Installing Java Runtime Environment (JRE)
Starting Eclipse
Create/Switch Workspace
What are Resources?
What are Path variables?
Configuring Network Preferences
Installing C/C++ Hardware Debugging
Creating Cross-Compile Project
Importing existing file(s)/folder(s)
Importing existing Project(s)
Git version control with Eclipse