I am getting the warning: function used but not defined
. I have static
__inline__
in header file say a.h
. The header file is included in <
You've declared the function to be static. This means that it is only visible within the current compilation unit. In other words: the implementation is only visible inside the a.c
file. You need to remove the static
keyword both in the a.h
and a.c
so that other .c files can see the function. You should specify a return value, e.g. void function1();
because it implicitly is int
if you didn't specify one.