I\'m trying to compile this program, as referenced in Beej\'s Guide to Network Programming on page 19.
#include
#include
Linking doesn't attach a header file to the program, pre-processing handles header files.
Linking attaches shared object libraries (look in /usr/lib) to compiled objects. Sometimes it is not sufficent to just add "-lnetdb" as the library might not be in the linker path. In that case, you need to use a -L(path) to add a path entry so the directive "-lnetdb" can find the correct netdb.so file.