views:

73

answers:

1

We are using Eclipse+CDT+SVN(Linux). How can we have some common header files in a separate include directory, which is also in the SVN, but not in the project specific subdirectory.

The main goal would be to create some common, reusable code for multiple projects and to be able to easily edit/commit that code within eclipse.

We have different directoy structures on the machines, so "simple" links would not work out.

+2  A: 

You could use:

  • an external project (as suggested by Rahul in the comments of your question) with those header files in it: your first project would "depend on" your second one.
    The problem is the path of the common project which can be different from machine to machine, while still being stored in full in the .classpath or .project of your CDT project.

  • a linked directory, which at least use a path variable for linked resources, and would only require to set that variable to the proper path (to the common project) depending on the current machine.

VonC
The include path can be stored in a variable, using the eclipse configuration options. It works great now. Thanks!
brandstaetter