Using the CVS Repository Exploring perspective, you can check out modules or directories into existing projects, or create new projects. A common scenario that you may encounter when starting to use the CDT, is determining how to bring existing C/C++ source files into Eclipse. There are a number of ways to do this. The scenarios described below are recommended approaches.
If your existing source tree is managed in CVS, you can use the CVS Repository perspective to "Checkout As..." any folder in the repository. The first time you "Checkout As...", the New Project wizard launches and you need to create a C or C++ project for the folder. For more information, see Creating a project, Creating a project via a project template and Working with C/C++ project files.
After you perform a checkout operation, a CVS checkout of the project occurs into the project's location. It is recommended that you eventually add and commit the CDT project files back into CVS. These files include .project, .cdtproject, and .cdtbuild (for Managed Build projects) and are located at the root folder of each CDT project.
Bringing code into the IDE from CVS differs slightly, depending on what you're importing:
To check out an existing C/C++ project from the CVS repository into your workspace, right-click the project in the CVS Repositories view, and select Check Out from the menu. A project with the same name as the CVS module is checked out in to your workspace.
To check out existing C/C++ code that is not part of a project:
The Check Out As wizard displays.
Choose the workspace location for this project, then the CVS tag to check out.
To import a directory full of C/C++ code into an existing project:
The IDE displays the Check Out As dialog.
Typically, existing projects will have their own makefiles, so you should create a new Make C/C++ project. For more information see Creating a project and Working with C/C++ project files.
To help you to identify a root folder for your project, consider the following guidelines:
The resources for the project are maintained in the remote location specified, not in the workspace folder for Eclipse. However, your existing folder structure is displayed in the C/C++ Projects view. Meta data for the project, such as the index for the project and the link to the existing source, is stored in the metadata directory in the workspace folder. For more information on the workspace folder, see Workbench User Guide > Tasks > Upgrading Eclipse.After you create a CDT project, you cannot easily move it or redefine its root folders. If you need to, you can delete the CDT project (without deleting its contents) and then recreate it specifying a different non-default location.
Another approach would be to create a C/C++ Project and then import your existing file system. For more information about importing, see Workbench User Guide > Tasks > Importing > Importing resources from the file system.
This approach copies the files from your file system to an Eclipse Workbench project or folder. Your original source files remain unchanged and it is the copies of the files that will be edited, built and debugged using the CDT. When you have successfully imported your existing file system, the folder structure is displayed in the C/C++ Projects view. Again, you should identify an appropriate "root folder" to import from.
Overview of the CDT
Working with C/C++ project files