Question

I know there are similar questions with answers, and some of them are being offered to my as I type this. However, none of them seem to offer a solution without absolute paths.

I have two projects in an SVN project, and they need use some .cpp and .h files in a shared way. I simply could not find a way of avoiding absolute paths, which are directly related to the directory I check out my code. It is very likely that everyone trying to use the code will have to modify these variables first.

I could not see any solution without using a variable (at best). Are there any recent tricks/developments I'm missing?

Was it helpful?

Solution

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

You need to do this:

New folder->Advanced, mark "Link to file/folder into filesystem", Variables->Workspace->Extend, then select other project files/folders.

Finally use:

New source folder of each new linked folders.

That's all!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top