I have a questions about using inline keyword in C code (C99). I know C99 inline semantics are different than C++ or gnuC inline rules, I have read
http://www.greenend.org.uk/rjk/tech/inline.html
and
but, I just can't get this working.
I have a function definition as below in file1.c
inline myfunc(arguments)
{
}
And this function is called from another function in file2.c
In that file2.c I tried using
extern inline myfunc(arguments);
for this function before it is called from the other function
still I keep getting error - implicit declaration of myfunc
or undefined reference error if I remove the extern inline
Due to my code structure, cannot have the myfunc function definition in a header file nor can have it as static inline, as it has to be called from different compilation units.
What is that I am getting wrong? How to fix it.