As the link say, the interface (header) tells you how to call some functionality (without knowing how it works), while the implementation (library) is the actual functionality.
Example:
To use the printf
function you need to include the header and the tells you how to call the printf function. It says, printf
can be called like this
int printf ( const char * format, ... );
The library is the one which implements it
int printf ( const char * format, ... )
{
...
...
...
}
One more example:
On linux, if you want to work with xml file, there is libxml
library. Suppose, if you want to read a xml file, there are function exposed like
xmlTextReaderRead, `xmlReaderForFile` etc...
These function are declare in the header file <libxml/xmlreader.h>
means this <libxml/xmlreader.h>
header tells you how to call the above said function, mean what parameters this function takes and what is its return value.
The library libxm2
implements these function and you have to link this library when you compile the code.