Subject: FVWM: Module FvwmCpp compile error: gethostbyname

From: [email-masked] (Scott Seighman)
Date: Mon, 27 Jan 1997 15:58:14 -0500

Folks,

Under Solaris 2.5, my make of fvwm2 fails during this module link (FvwmCpp):

# make
rm -f FvwmCpp
gcc -o FvwmCpp FvwmCpp.o -g -Wall -pipe -L/usr/openwin/lib ../../libs/libfvwm2.a -lXpm -lXext -lX11   
Undefined                       first referenced
 symbol                             in file
gethostbyname                       FvwmCpp.o  (symbol belongs to implicit dependency /usr/lib/libnsl.so.1)
ld: fatal: Symbol referencing errors. No output written to FvwmCpp
*** Error code 1
make: Fatal error: Command failed for target `FvwmCpp'
#

Any suggestions...?  I seem to be the master of strange compile failures...

Thanks!
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Mark Boyns <[email-masked]>
Date: 28 Jan 1997 07:17:23 -0800

> Any suggestions...?  I seem to be the master of strange compile failures...

You need to link with -lnsl and -lsocket, like this:

gcc -fpcc-struct-return -o FvwmCpp FvwmCpp.o -O2      -L/opt/X11R6.3/lib ../../libs/libfvwm.a -L/usr/local/lib -lXpm  -lXext -lX11    -lsocket -lnsl

What version of X are you using?  I'm using X11R6.3 + Solaris 2.5 and
didn't have any compile troubles.