I have gone through some posts related to this topic but was not able to sort out my doubt completely. This might be a very naive question.
I have a header file
Maybe you should post the actual code. The snippets you show don't compile:
extern inline int func1(void)
That doesn't make any sense.#define
I think you meant include
instead.Once I fixed those and compiled with gcc, it compiled fine and I got the following output
5
6
7
When I compile with g++, I get this output:
5
6
700
That happens because func3() is not static in inline.h