If a function is not found, check again with "-lsocket", "-linet", "-lsocket -lnsl", or "-lresolv". Also display network libs in final summary as well as the different linker flags.
foo