> #include "functionimporttest.c"
Most of your confusion comes from this.
Including .c files is 99% the wrong thing to be doing.
You need
#include "functionimporttest.h"
Where the .h file contains
functionimporttest.c also needsCode:#ifndef FUNCTIONIMPORTTEST_H #define FUNCTIONIMPORTTEST_H extern int glob; void add(int a, int b); #endif
#include "functionimporttest.h"