When you compile your program that uses a dynamic library, object files are left with references to the library functions just as for any other external reference.
You need to include the header for the library so that the compiler knows the specific types of the functions you are calling. Note the compiler only needs to know the types associated with a function (such as, it takes an int and returns a char *) so that it can correctly allocate space for the function call.
大致的意思就是说,是使用函数的时候,需要声明原型(#include相应的头文件;或者extern)。这有助于编译器生成相应的正确代码。否则,函数调用关系时产生的代码可能有错误。