Eclipse - "This project is not a CDT project" Eclipse - "This project is not a CDT project" c c

Eclipse - "This project is not a CDT project"


If you are importing an existing CDT project and see “This project is not a CDT project”, it could be that the project was created on an older version of Eclipse, and you need to:

  • Select the project in the Project Explorer tab,
  • Click File->New->Convert to a C/C++ project

This will add a new .cproject file, and you are then ready to go.


When creating your new project you need to create it as a makefile project - it will then use make to build the project but setting build properties up needs to be via your makefile and the make invocation.

This link tells you how to create a makefile project:

To create a project:

Select File > New > Project.

When you create a new project, you are required to specify the project type. This project type will determine the toolchain, data, and tabs that the CDT uses/displays.

Select the type of project to create. For this tutorial, expand the C/C++ folder and select C++ Project. The C++ Project wizard opens. Click here to see an illustration.

By default, the CDT filters the Toolchain and Project types that currently display in those lists are based on the language support for the C++ Project wizard you selected for this tutorial.

In the Project name field, type HelloWorld. Leave the Use Default Location option selected.

Next, you want to select the type of project to create. In the New CDT Project Wizard, you can choose from the following project types: Executable - Provides an executable application. This project type folder contains three templates. Hello World C++ Example provides a simple C++ Hello World application with main(). Hello World ANSI C Example provides a simple C Hello World application with main(). Empty Project provides a single source project folder that contains no files. After you select this template, the result is a project with only the meta-data files required for the project type. You are expected to provide source files for the project's target. The makefile for the Executable project type is automatically created by the CDT.

  1. Shared Library - An executable module that is compiled and linked separately. When you create a project that uses a shared library (libxx.so), 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 libxx.so.version, where version is a number with a default of 1. The libxx.so file usually is a symbolic link to the latest version. The makefile for this project type is automatically created by the CDT.
  2. 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.
  3. 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.


The root of the problem is not located in Eclipse, it's in the makefile.

The directory structure of the whole Project is the following:

Project_Dir\Documentation\Project_Dir\Output\Project_Dir\Software\Project_Dir\Tools\

The Source files are all located in the \Software\ directory. So I chose Project_Dir\Software\ as the project folder, which meant that the .project and .cproject files are located there.

The makefile itself temporarily writes the outputfiles in the \Software\ folder as well. In the end it copies all files from the Software dir to Output (practically a move *.* Project_Dir\Output\ command)

This command was also moving the Eclipse project-files, thus making it hard for eclipse to find them and open the project properties.

Two solutions:

  1. Change the project directory in eclipse to \Project_Dir\ since it's all project related stuff anyway
  2. Add two lines to the makefile: Before the move command: attrib +r +s *.project and attrib -r -s *.project after the move command. (Same for .cproject). This prevents the makefile from moving the files