Eclipse Cdt Documentation
|Eclipse for C/C++ Developers|
Eclipse Cdt Linux
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)
- Search Engine
- Content Assist Provider
- Makefile generator
You need to use the Callisto Discovery Site to add the CDT features.
What do you need?
Importing a C project into Eclipse CDT (8,575) IoT device development kits (7,320) Some programmable wireless ICs and modules (6,406) Building several executables in one Eclipse CDT project (6,253) Starting with a mangOH Green board (5,030) SODAQ ExpLoRer and Bluetooth (4,966) mangOH Red: using a Linux Mint VM for development (3,541). I installed version 0.97 of the extension into Eclipse/CDT 2019-06. The installation appeared to complete successfully but the Call Graph context menu options do not appear. Moreover, it is not possible to enable the Call Graph toolbar via the Customise Perspective dialog.
Eclipse 3.2 is required for Callisto. There is no upgrade path from previous versions of Eclipse.
Eclipse Cdt Gdb
- The Eclipse Platform RuntimeBinaries
Eclipse SDKThe Eclipse Platform Runtime Binaries provides base integrated development environment (IDE) functionality, but without support for any specific programming language. Combining the CDT with the Platform Runtime forms a first-class C/C++ IDE.
- The C/C++ Development tools (CDT)
CDTThe CDT provides advanced functionality for C/C++ developers. Combining the CDT with the Platform Runtime forms a first-class C/C++ IDE.
Tutorials and Help
I’m currently writing some C code. I have chosen to use Eclipse CDT as IDE. Eclipse is very powerful, but configuring it in the right way when starting a project can be complex. This article describes steps I followed to import some existing C code, creating a managed project. It is assumed that the reader has a basic knowledge of Eclipse.
For what follows, we will work with some sample code, stored in following file hierarchy:
Header files are stored in include directory, while source code is stored in src directory.
Eclipse for java jdk. I’m using Eclipse Oxygen 1a Release, on Linux Mint 18.2.
Note: the code I develop must be portable. The first version I write targets Linux on Intel processor. That’s why I’ll use Linux GCC toolchain in what follows. Then, when I’m happy with the version running on Linux, I check that code works OK on other targets (FreeRTOS on STM32, Arduino, etc.) Of course, every OS- or hardware-dependent code is isolated and adapted to related target.
Importing source code
I want to import the existing source code into Eclipse, creating a managed project, i.e. a project where makefiles are automatically generated and maintained by Eclipse.
To do this:
- File / New / Makefile Project with Existing Code
- enter project name
- select source code top-level directory
- uncheck C++
- select Linux GCC for toolchain
- Project / Properties / C/C++ Build
- check Generate Makefiles automatically
- Project / Properties / C/C++ Build / Settings / Build Artifact
- select Executable for Artifact Type
- Project / C/C++ General / Paths and Symbols / Source Location
- add source code directory
- Project / Properties / C/C++ General / Paths and Symbols
- in Languages column, select GNU C
- click on Add… button
- click on Workspace… button
- select include directory
Building the project
- Project / Build Project
Running resulting executable
- Run / Run Configurations…
- select C/C++ Application and click on the New launch configuration icon
- check that Name, Project and C/C++ Application are filled in with the right values
The project is created under an Eclipse configuration named Default. You can create several configurations: one for debugging, one for releasing, etc.
Eclipse Cdt Troubleshooting
To configure Eclipse CDT so that several different executables can be created in the same project, check this article.