CDT projects

Before you do any 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.

Tip: Nested projects are not supported. Each project must be organized as a discrete entity. Project dependencies are supported by allowing a project to reference other projects that reside in your workspace. For more information, see Selecting referenced projects.

For more information about projects and where they are stored, see:

Project types

You can create a standard make C or C++ project or a managed make C or C++ project.

Standard Make C or C++ project

You need to create a makefile in order to build your project or use an existing makefile.

Managed Make C or C++ project

A managed make project generates the makefile for you. In addition, the files module.dep and module.mk are created for every project sub-directory. These files are required for your managed make project to successfully build.

How the CDT associates project natures

Projects are assigned natures and tags that identify the properties of each project. The CDT uses natures to identify what can and cannot be done with each project. The CDT also uses natures to filter out projects that are contextually irrelevant; for example, non-library projects from a list of library projects.

Project Associated natures
Standard Make C Project C, make
Managed Make C Project C, gen make
Standard Make C++ Project C, C++
Managed Make C++ Project C, C++

Project conversion

You can convert a C project to a C++ project and vice versa. An example of when this may be useful is if you create a C project, your requirements change during the course of the development, and you need to continue coding in C++. Since the initial project was coded in C, the parser will not recognize certain semantics such as "class", or keywords such as "public", "private", and  "template". You need to create a C++ project to make the parser and other tools aware of the language change. You can simply convert your C project to a C++ project rather than creating a new C++ project, copying your project files over and resolving source control issues.

A few notes about projects

For more information about projects, see Workbench User Guide > Concepts > Workbench > Resources.

Related concepts
Project file views
How to bring C/C++ source into Eclipse

Related tasks
Defining project properties
Working with C/C++ project files

Related reference
Project properties
Views

IBM Copyright Statement