I have to compile those files in that order: a first and then b because of other requirements.
now the files are of this form: a.h
void caller_func(void);
a.c
#include "a.h" #include "b.h" void caller_func(void){ called_func(void); }
b.h
void called_func(void);
b.c
#include "b.h" void called_func(void){ //any action }
and on compilation i get a.so: undefined reference to 'called_function'
is there anyway to go around this (besides changing compilation order)?