Path: utzoo!attcan!uunet!munnari.oz.au!uhccux!ames!sgi!shinobu!odin!camelot!jesse From: jesse@camelot.sgi.com (Jesse Rendleman) Newsgroups: comp.sys.sgi Subject: Re: using gethostbyname() Keywords: gethostbyname help Message-ID: <8378@odin.corp.sgi.com> Date: 1 Jun 90 19:59:45 GMT References: <14410@thorin.cs.unc.edu> Sender: news@odin.corp.sgi.com Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 23 In article <14410@thorin.cs.unc.edu> taylorr@glycine.cs.unc.edu (Russell Taylor) writes: > > I am trying to use the 'gethostbyname()' system call in a program. >The manual entry mentions that I must link with 'libbsd.a' in order to use >this function. However, the function is not defined in that library (or >any other library that I can find) and the loader complains about it being >undefined. > > Russell Taylor on my system, "nm /usr/lib/libbsd.a | grep gethostbyname" finds all the entries you'd expect. your compile line should be something like "cc prog.c -lbsd -o prog"? do you have the development option loaded on your machine? (check "versions | grep dev", which should say something like... I dev 5900637 Dev Sys PD 3, S5-DV01-3.2, 808-0059-006 I dev.sw 89/09/06 5800637 Dev Sys SW 3, S5-DV01-3.2, 808-0058-006 I dev.man 89/09/06 6000637 Dev Sys Man 3, S5-DV01-3.2, 808-0060-006 good luck,