开发者

Eclipse CDT: Import source / header files into my new project, without duplicating them

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 c开发者_如何学JAVAant get it.

Thanks in advance.


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)


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜