I am using extern
in my project for variables and functions so that i can share that with my other source files in future.
How am i trying to use it?
I had made a "Header file" for Declaration
of Variables and functions by the name dec.h
There is another file by the name def.c
in which I had Defined
those Variables and functions. def.c
file includes dec.h
file.
Now in my main
program, when I include dec.h
file only and try to build the program, compiler warns as Unresolved Extern [My function names]
.
Am I trying to do it the wrong way? I have read to use extern that way in the following thread How do I use extern to share variables between source files in C?
The above procedure was right, The problem was that I haven't included the def.c
to my project files.