How to create Eclipse project from existing source

When you create a project in Eclipse (or NVIDIA Nsight), it creates a new directory in your workspace and creates the files there. If you have your source files arranged under a directory in some other location, you might prefer to work on them without Eclipse copying them over to its workspace directory.

To achieve this, do not use the import option! Instead create a new project, in its dialog uncheck the Use default location option and provide the root directory of your source code. The entire contents of your source directory will appear in the newly created project. Do not fear, they have not been copied. Instead, Eclipse has created .project, .cproject and other hidden files and directories in your source directory, so that it can work from there. Also, any new files or directories you create under your source directory will automatically appear in your Eclipse project.

Another alternative to this approach is to create a Makefile project, which works similarly.

Tried with: NVIDIA Nsight 5.5.0 and Ubuntu 12.04 LTS


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.