(Answer) (Category) SCO comp.unix.sco.programmer FAQ. : (Category) SCO Development Environments. :
Link errors on functions like gethostbyaddr, gethostbyname
For the unresolved functions, do a 'man functionname'. For example, a 'man gethostbyaddr' shows
  gethostbyname(SLIB)
  *******************
____________________________________________________________________________ gethostbyname, gethostbyaddr, sethostent, endhostent, herror, hstrerror -- get network host entry
gethostbyname- get network host entry by name
gethostbyaddr- get network host entry by address
[ ... ]
  Syntax
  ======
cc . . . -lsocket
#include <netdb.h>


This man page tells us that we must #include <netdb.h> before using these functions and that we must be sure that our cc line links against the socket library by having a '-lsocket' at the end.

This same technique should be applied to any link error that you feel the system really does know about but you just don't know where it is.
robertlipe@usa.net

[Append to This Answer]
Previous: (Answer) Will ELF binaries compiled on OpenServer run on anything else?
Next: (Answer) How do I read or traverse directories within a program?
This document is: http://www.zenez.com/cgi-bin/scoprogfaq/faq?file=12
[Search] [Appearance]
This is a Faq-O-Matic 2.721.