Re: Header files included in header files
From: John Smith (soneone_at_microsoft.com)
Date: 07/22/04
- Next message: Kelsey Bjarnason: "Re: How does this 'sizeof(*area)' work?"
- Previous message: Dan Pop: "Re: Header files included in header files"
- In reply to: John Smith: "Header files included in header files"
- Next in thread: Arthur J. O'Dwyer: "Re: Header files included in header files"
- Reply: Arthur J. O'Dwyer: "Re: Header files included in header files"
- Reply: Michael Mair: "Re: Header files included in header files"
- Reply: Jack Klein: "Re: Header files included in header files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 22 Jul 2004 14:20:19 +0100
"John Smith" <soneone@microsoft.com> wrote in message
news:cdl6fm$lmj$1@newstree.wise.edt.ericsson.se...
> Hi all
>
> What does the group think of the practise of including one header file
from
> inside another?
>
> I have some legacy code where this has been done, and it creates a
> dependency on a module (collection of files) which are not required,
except
> for one header file's contents.
>
> I'd say 'No, header files should be included in the C source, not in
another
> header', but I've always come across strong arguments for the latter.
>
> What do you think, and what is accepted practise?
>
> Thanks
> JS
>
>
What is this obsession with replying 'Don't forget the inclusion guard'???
It's old hat. My secnario has this in place.
My problem is one module is creating a dependancy on another module only
because the first module wants to use one single #define in the second
module.
The application is a large one, backed up by an overly sophisticated build
system, which would mean if I want to pick up module 2, I pick up all of it:
it all gets compiled. (And yes, I know: it won't get linked in!).
So the question is: is it normal practise to create intermodule dependancies
for trivial reasons?
- Next message: Kelsey Bjarnason: "Re: How does this 'sizeof(*area)' work?"
- Previous message: Dan Pop: "Re: Header files included in header files"
- In reply to: John Smith: "Header files included in header files"
- Next in thread: Arthur J. O'Dwyer: "Re: Header files included in header files"
- Reply: Arthur J. O'Dwyer: "Re: Header files included in header files"
- Reply: Michael Mair: "Re: Header files included in header files"
- Reply: Jack Klein: "Re: Header files included in header files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|