Source file sharing between projects

Tarjei Knapstad tarjeik at
Mon Sep 22 15:48:03 BST 2003

On Sat, 2003-09-20 at 05:10, Mickael Faivre-Macon wrote:
> Hi Tobias,
> Thank you for your reply!
> This does not resolve the fact that each file added to the project is 
> duplicated into the project dir.... I don't want to work on a copy of my 
> files. That's the problem. Do you mean I have to include them manually? 
> Without using "Project/Add existing files"? How can I do that?
> >
> >>Hi,
> >>
> >>I come from the Windows programming world where the source file of a 
> >>project can be shared between projects. You put your classes in a 
> >>directory and when you include them in a project, they stay in the 
> >>directory they are in. When including files in a KDevelop project, the 
> >>files are copied to the project directory. I find that very annoying 
> >>since a utility class can be used in a lot of project and when you make 
> >>a change in the class you have to copy the newer version to all your 
> >>project dir to have the latest version of you class available.
> >>
> >>Why is it like that ? What can I gain over my old habits by adopting 
> >>this Linux way of doing things ?
> >>
> >>Mickael.
> >>


I think there's a slight misconception here. If you have utility classes
that are used across a multitude of projects, then those utility classes
belong in a utility library which you should use "externally" in your
other projects. If you want to develop and maintain those utility
classes using KDevelop, then you should create a separate project for
them. You should add any needed headers to be installed with that
package. Whenever you do a new version of your utility library, you
should build and "make install" it, for instance to /usr/local.

When you want to use your utility library in other projects, you should
just #include the headers you need, and link your project with your
utility library. Your library files should not be included in other
projects at all, just like you would never include any parts of the
standard library into your project.


to unsubscribe from this list send an email to kdevelop-request at with the following body:
unsubscribe »your-email-address«

More information about the KDevelop mailing list