You have to do this when the function is not in the standard library; that's however not for every include file the case (e.g functions in stdio.h do not need an additional to be linked).
Unfortunately I can not tell you where to find the info.
PS
Just in case you want to ask more programming related questions in the future:
there is a
dedicated programming section at LQ that's better suited for programming related questions.