[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Advice on the project structure for a library

From: Jef Driesen
Subject: Re: Advice on the project structure for a library
Date: Tue, 03 Jun 2008 15:29:57 +0200
User-agent: Thunderbird (Windows/20080421)

Ralf Wildenhues wrote:
* Jef Driesen wrote on Tue, Jun 03, 2008 at 12:31:29PM CEST:
#include <libfoo/header.h>


#include <header.h>
It's purely a matter of preference. You're right to segregate the headers, but a project shouldn't mandate one #include/-I style over another.
I don't really want to mandate a specific style to the users of my library. I just want to use the first style inside my own library, and right now that doesn't work.

Good thinking.  The first style helps avoid name clashes with generic
header file names.

That's exactly the reason why I wanted to use that style.

Suppose that in one of my public headers, I include one of the other header files, with <libfoo/headerx.h> style. Now when I compile the library in my src tree, it fails because there is no such header present in my src tree or system wide (not installed yet). The same for the examples.

Can you reorganize your source tree to look more like the installed
tree?  IOW, move headers in a subdirectory libfoo or include/libfoo.
The biggest reason against doing so, namely that CVS doesn't track
renames, isn't very relevant any more nowadays.

I can reorganize my source tree anyway I want. I'm using subversion, so renaming is no problem.

Is there any preference for choosing libfoo or include/libfoo, or is that just personal taste?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]