hello
i'm continuing a pretty big
project wich was not either
designed/thought/coded by me
earlier.
now i have to make some modules
to it.
for that purpose it is needed
to make .h and .c to accompany
the big project as a module.
the problem i am experiencing
is purely of convention ,but
it seems i cannot overcome it
by any means that i know of.
consider for example the following
files
<- will mean "contains"
main.c <- mi_core.h
mi_core.c <- mi_core.h
mi_fifo is a module wich
is structured like this
mi_fifo.c <- mi_fifo.h
mi_fifo.c <- tree.h
tree.c <- dbl_list.h
dbl_list.c<- dbl_list.h
this module mi_fifo is linked
and is separate from main.c.
mi_fifo is to be linked dynamically
with main.
(it is compiled as a .so file)
i have respected the convention that
all functions should be first declared
in .h and are to be defined(written) in
.c ,but i am keeping experiencing some
warnings at compilation(of mi_fifo).
../../mi_core.h:65: warning: ‘mi_trim_filename’ used but never defined
the above is the type of warning i keep
experiencing.
now if i include besides the .h the .c also
in this case i don't get the warning above
no more.
i should also mention that the .h is structured
as :
#ifndef _NAMEOFHEADERFILE_H
#define _NAMEOFHEADERFILE_H
<content_of_header_file>
#endif
this i understand that i must use so that this
header will not be processed twice,and it makes
sense to me
i would like to get some help on how to remedy
my problem
thank you