I have written a code that just basically add two numbers. file is the self made header file named xoxo.h
extern int add(int r,int m);
This is my second file that contains the function defination of the function add.The name is run.c
#include "xoxo.h"
int add (int i,int f) {
return (i+f);
}
This is my main file tester.c
#include "xoxo.h"
#include <stdio.h>
void main() {
printf("%d",add(1,2));
}
The error is shown as
PS C:\Users\HOME\Desktop\New folder> gcc tester.c C:\Users\HOME\AppData\Local\Temp\ccBwWXFk.o:tester.c:(.text+0x1e): undefined reference to `add' collect2.exe: error: ld returned 1 exit status
plz help