Possible Duplicate:
What's the difference between a header file and a library?
Can anyone tell me what's the actual meaning of a header file and a library file and their difference?
For example we include header file with .h extension in our program and its just the definition but the actual implementation is defined in library files and this is done at linking stage this is what people say but sometimes we include the library files directory too for the programs to generate the exec file for example in posix threads people say to include the -lpthread in the command line but why when we included the header file #include<> why we still need to include the library files too may i know the reason please??