Hi,
I would like to ask a question on library.

If under a project folder there are two files:
1. The original library source file with suffix .c, for example, my_math.c; it is also included as a project file.
2. The compiled library my_math.lib generated from my_math.c; it is added to the project as a library file
And when another project file, say main.c, references a function, say, my_addition() both defined
1. In my_math.c
2. Also contained in my_math.lib
What is the order of searching?
1. With the presence of my_math.lib, would the compile still compile my_math.c?
2. Would the linker link calls of my_addition() in main.c to compiled object file corresponding to my_math.c, or directly to my_math.lib?
I searched ISO C99 standard as well as K&R 2, but it seems there is no discussion about this.
It is basically a stipulation on search order. Is there any specific rules governing this? Or is it customizable?
Zheng