In my project, I define a global variable in a .c file, and then it is accessed in another .c file. In the second file, first I declare the global variable as "extern int global_var;", then assign it a value or other work in a scope. But when I make the project, I got a link error:"undefined reference to global_var".

What's the problem?Please give me a tip...
Thanks!!