views:

323

answers:

2

Hi all,

Im sure there is a very simple solution for this.

I have a bunch of .cpp / .h files from a project, say in directory ~/files

On the other hand, I want to create a c++ project using eclipse to work on those files, so I put my workspace on ~/wherever. Then I create a c++ project: ~/wherever/project, and include the source files (located in /~files).

The problem i'm having is that files are now duplicated in ~/wherever/project, and I would like to avoid that, specially so I know which copy of the file to commit.

Is this possible? Im sure it is, but cant get it.

Thanks in advance.

+1  A: 

Create a file or folder in your project as per normal (choose File->New->Folder), give it a name, and click on the Advanced button. This reveals a file-choose field where you can browse for the resource you want to "virtually" include in the project. Click Okay and the file/folder you named is now linked outside of the project.

fabrizioM
+1  A: 

You could try:

  • creating the project directly above the ~/files (which is not very clean, given the location of the sources in your home dir)
  • using a linked folder
  • importing existing sources in your project: details all the options (when your sources are also managed by a VCS like CVS, or when your sources are not managed)
VonC