About library file

I want to ask theat how can i generate a standard library file which contain some sample function.
for example:

a Ray.lib which contain a
add(int x,int y) function

and how can i use this library file when i want to call it in another project?

pls help!

More questions in this forum