Can I share source code between projects in Eclipse (CDT) without using absolute paths?

I know that there are similar questions with answers, and some of them are offered to me when I print this. However, none of them seem to offer solutions without absolute paths.

I have two projects in an SVN project, and they should use some .cpp and .h files together. I simply could not find a way to avoid the absolute paths that are directly related to the directory in which I check my code. It is very likely that anyone trying to use the code should change these variables first.

I have not seen any solution without using a variable (at best). Are there any recent tricks / events that I am missing?

+6
eclipse eclipse-cdt relative shared
source share
1 answer

I think I solved it !. In Eclipse CDT 8, you can use linked files / folders with absolute or relative paths in Workspace.

You need to do this:

New folder-> Advanced, check "Link to file / folder in the file system", "Variables-> Workspace->" Expand ", then select other files / folders of the project.

Finally use:

A new source folder for each new linked folder.

What all!

+4
source share

All Articles