when i use extern to get a variable 'a' from another file in the same project folder it shows an error: undefined reference to `a'.
can someone explain why is that and what is the solution for it?
int main(int argc, char const *argv[])
{
extern int a;
printf("%d",a);
return 0;
}```
```#include <stdio.h>
int main(int argc, char const *argv[]) {
int a=5;
return 0;
}```