Skip to the content of the web site.

Managing projects in Eclipse

You will be creating many projects in this course, and it is always best to think of each project as a separate endeavour. Sometimes, a novice programmer may finish Project 1, but rather than starting a new project, will instead just try to modify a previous project.

Instead, each time you want to start a new project, be it for a course project, for experimenting with source code from class, or working on a side project, create a new project in Eclipse. This is described in much greater detail on the Eclipse page, but in summary it includes:

  1. Select FileNewC/C++ Project.
  2. From the New C/C++ Project dialog box, select C++ Managed Build and select Next >.
  3. From the C++ Project dialog box, enter a unique name next to Project name:, and select Project type: Empty Project and Toolchains: Cygwin GCC and select Finish.

You can now add source files by selecting FileNewSource File.

You can always select the project you want to work on by clicking on the project name in either the Project Explorer tab or the more specific C/C++ Projects tab. If you cannot see either tab for this in the left panel, you can make either visible by selecting WindowShow ViewProject Explorer or WindowShow ViewC/C++ Projects.

The state of a project is either open ( where the "C" indicates it is a C/C++ project) or closed (). You can toggle between these two states by selecting the project in the Project Explorer and then selecting either ProjectOpen Project or ProjectClose Project. Alternatively, you can toggle the state of a project by right-clicking on the project and selecting either Open Project or Close Project, whichever is on the context-sensitive menu that appears.

It is highly recommend to have at most one project open at a time.