i file .h non sono librerie sono file header..

nel tuo main fai #include "lib.h"?

come compili?