Problem with gcc

L. Scott Emmons emmonsl at athena.ecs.csus.edu
Tue May 21 14:52:17 AEST 1991


In article <1991May19.144743.25904 at nntp-server.caltech.edu> tll at nntp-server.caltech.edu (Tal Lewis Lancaster) writes:
>After compiling all of my .c files using gcc, I get the following
>message when it is trying to link:
>
>Undefined symbols        First referenced in
>----------------------------------------------
>select                   /usr/lib/libsocket.so
>syslog                   /usr/lib/libsocket.so
>seteuid                  /usr/lib/libsocket.so

The only way I could get socket stuff to work on my UX was to make sure that
/usr/ucb was in the path before /usr/ccs.  Also you need to execute gcc
thusly:

	gcc -o file file.c -lsocket -lucb
			   ^^^^^^^^ ^^^^^

/usr/ucb/ld will complain about some library (libsocket.so, I think) being
included twice, but it will work ok.

Strangely 'nuff, if you want to compile&link programs which don't use sockets
and BSD stuff, /usr/ucb must _not_ be in the path before /usr/ccs...very,very
strange behavior!

I posted an inquiry about this problem about 3 weeks ago to this newgroup, and
received only one reply; If you figger anything else out about this, please
let me know!

Good luck!

			L. Scott Emmons
			---------------
	emmons at csus.csus.edu  <or>  ...[ucbvax]!ucdavis!csus!emmons
		Packet: kc6nfp at kg6xx.#nocal.ca.usa.na



More information about the Comp.unix.amiga mailing list