Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!ucsd!ucbvax!ucdavis!csusac!usenet From: emmonsl@athena.ecs.csus.edu (L. Scott Emmons) Newsgroups: comp.unix.amiga Subject: Re: Problem with gcc Keywords: gcc unix library amiga Message-ID: <1991May21.045217.19569@csusac.csus.edu> Date: 21 May 91 04:52:17 GMT References: <1991May19.144743.25904@nntp-server.caltech.edu> Sender: usenet@csusac.csus.edu (News account (alt)) Organization: California State University, Sacramento Lines: 34 In article <1991May19.144743.25904@nntp-server.caltech.edu> tll@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@csus.csus.edu ...[ucbvax]!ucdavis!csus!emmons Packet: kc6nfp@kg6xx.#nocal.ca.usa.na