R
Roman Mashak
Hello, All!
I wonder are there any typical, common used practises to organize all
#include's in the large/medium size project. Try to explain what I mean:
suppose I have three tranlsation units in project and correspondent header's
with functions declarations, typedefs and etc.:
unit1.c, unit1.h
unit2.c, unit2.h
unit3.c, unit3.h
In my opinion it would be very simple to make ONE big header, call it
defs.h, which include in every unit's header file. That defs.h would include
all important headers (suppose stdio.h, stdlib.h, string.h, errno.h so on)
and also some macros, variables, types. It seems fine, except the issue that
some of these headers might be useless in other translation units, though
preprocessor will process it.
Hopefully my explanation is comprehensible
With best regards, Roman Mashak. E-mail: (e-mail address removed)
I wonder are there any typical, common used practises to organize all
#include's in the large/medium size project. Try to explain what I mean:
suppose I have three tranlsation units in project and correspondent header's
with functions declarations, typedefs and etc.:
unit1.c, unit1.h
unit2.c, unit2.h
unit3.c, unit3.h
In my opinion it would be very simple to make ONE big header, call it
defs.h, which include in every unit's header file. That defs.h would include
all important headers (suppose stdio.h, stdlib.h, string.h, errno.h so on)
and also some macros, variables, types. It seems fine, except the issue that
some of these headers might be useless in other translation units, though
preprocessor will process it.
Hopefully my explanation is comprehensible
With best regards, Roman Mashak. E-mail: (e-mail address removed)