I have my file where I have declared functions function1 and function2
include.h in /dir1/dir2/dir3/dir4/
I have defined all the functions and variables in
file include.c at path /dir1/dir2/dir3/dir5/
and I am using these functions at path
/dir1/drr2/dir3/dir6/
my pseudo code is ...
#include "include.h"
extern int function1();
extern void function();
...
function release()
{
int i = function1();
}
after compiling following error is thrown :
undefined reference to 'function1'
relocation truncated to fit: R_MIPS_26 against 'function1'
I know that when we use extern we have to compile both the files but I am currently working with a OS161 and cannot compile files individually. i have to complile all the OS files together and then install them into kernel and finally boot it.
Where is the mistake?