[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Where to place include files
From: |
Julio Merino |
Subject: |
Re: Where to place include files |
Date: |
Sat, 29 Sep 2001 09:05:39 +0200 |
User-agent: |
Mutt/1.3.22i |
On Sat, Sep 29, 2001 at 07:12:28AM +0200, Ralf Corsepius wrote:
> Am Fre, 2001-09-28 um 19.15 schrieb 1001697323:
> > Do you think this is a "logical" way to do this?? Or this is weird?
> Well, this is the way imake applied (still applies ?).
>
> IMHO, it is weird, error-prone and hard to maintain :) (No punt
> intended).
>
> What I do in such cases is either to
> * Apply a similar layout as Guido mentioned.
> Pros: Simple source-tree layout
> Cons: You would have to redesign your existing header hierarchy, files
> are not safe against accidentially includeing private headers from
> public ones.
>
> * Layout your include directory hierarchy as it would be after
> installation, i.e. put all public headers below include/.. applying the
> same layout as the final layout would have, eg.
> include/prodesk/<someheader>.h
> Pros: Proper separation of public and private headers, safe against
> accidental inclusion of private headers.
> Cons: Somewhat more complex source-tree layout.
Ok, this one is the "same" as I said, but without symbolic links. So,
why not use them? A simple script would populate the include/ directory
with them... This way, I can have the sources and headers together
(which are always called the same... i.e. string.cpp and string.h),
and also, have it working.
Thanks.
>
> For larger projects and for projects with long development cycles, I
> personally prefer the second way of doing it, for small project it
> actually doesn't matter.
>
> Just my 0.02 Euros
>
> Ralf
>
>
--
Make a better partition table: http://www.jmmv.f2s.com/ept
Julio Merino <address@hidden> ICQ: 18961975
pgpm2Z2vzOKeZ.pgp
Description: PGP signature